Skip to content

errorcheck: Shorten file path for error location

Frank Winklmeier requested to merge fwinkl/athena:errorcheck_shorten into master

Shorten the file path when reporting errors (e.g. using the CHECK macros). Instead of showing the full path, which is anyhow specific to the build node:

ERROR /build/atnight/localbuilds/nightlies/master/athena/Control/AthenaKernel/test/errorcheck_test.cxx:39 ...

only show the relevant parts starting at the package name:

ERROR AthenaKernel/test/errorcheck_test.cxx:39 ...

This relies on the availability of the PACKAGE_VERSION macro, which is set by our cmake configuration. If not available, no shortening will be performed.

Should not cause any failures with references as file paths gets stripped away by our default post-processing script.

cc @tbold who suggested this change and @ssnyder for explicit approval

Merge request reports