Project

General

Profile

Feature #22690

Improve portability of CetTest

Added by Ben Morgan 4 months ago. Updated 4 months ago.

Status:
Under Discussion
Priority:
Normal
Target version:
-
Start date:
06/06/2019
Due date:
% Done:

0%

Estimated time:
Duration:

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:

  1. cet_test_exec has a dependence on GNU getopt, which may not be present (at least on macOS)
  2. 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:

  1. Provides a pure bash implementation of GNU getopt in cet_test_exec
  2. 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 4 months ago

  • Assignee set to Patrick Gartung
  • Status changed from New to Under Discussion

Patrick will take a look.

#2 Updated by Ben Morgan 4 months ago

For further info, I've identified two additional places affected by use of relative paths/PATH to known resources:

I'll add a proposed fix for these to the same branch.

#3 Updated by Ben Morgan 4 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 4 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.



Also available in: Atom PDF