Feature #22690
Improve portability of CetTest
0%
Description
I've been testing the Spack-MVP1 feature branches up to Art, admittedly quickly outside of spack-dev, and found a couple of issues with CetTest:
- cet_test_exec has a dependence on GNU getopt, which may not be present (at least on macOS)
- CetTest uses relative/base paths to test executables, and so relies on PATH being set up though CMake/CetTest can easily find the exact paths. Using these full paths is more reliable in case of any clashes.
I've prepared a branch on a GitHub fork:
with two commits:
- Provides a pure bash implementation of GNU getopt in cet_test_exec
- Set CET_TEST_EXEC by expanding a generator expression for the built target, or from the known full path to a script copied by cet_script
There may be a few corner cases for CET_TEST_EXEC.
Whilst these are outside of spack-dev, I think they would simplify usage in that environment as well.
History
#1 Updated by Kyle Knoepfel 6 months ago
- Assignee set to Patrick Gartung
- Status changed from New to Under Discussion
Patrick will take a look.
#2 Updated by Ben Morgan 6 months ago
For further info, I've identified two additional places affected by use of relative paths/PATH to known resources:
- source:Modules/CheckClassVersion.cmake#L69
checkClassVersion
is known to cetmodules, so absolute path easily derived at runtime
- source:Modules/RunAndCompare.cmake#L35
- The
filter-output
program is part of cetmodules, so its path can be derived
- The
I'll add a proposed fix for these to the same branch.
#3 Updated by Ben Morgan 6 months ago
Ben Morgan wrote:
I'll add a proposed fix for these to the same branch.
Now done on branch: https://github.com/drbenmorgan/fnal-cetmodules/tree/cettest-portability
in commit: https://github.com/drbenmorgan/fnal-cetmodules/commit/cc9afa1c98229eef3c9a33b741ada99ad749b919
This should now be ready for testing at FNAL. I've confirmed this resolves the given issues on a CentOS7 build for MVP1a branches of cetlib_except through to art.
#4 Updated by Ben Morgan 6 months ago
One further commit has been added to resolve the case where output of cet_script
is used as input to cet_test
via HANDBUILT TEST_EXEC
.
https://github.com/drbenmorgan/fnal-cetmodules/commit/f9406dfeaf24ff9b480c0fb46391df441bf29cef
This was identified in art_root_io
, and with this fix, all Spack-MVP1a branches are working up to the critic
level.