Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dstripe app test failing #5613

Open
KrisBecker opened this issue Sep 12, 2024 · 0 comments
Open

dstripe app test failing #5613

KrisBecker opened this issue Sep 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@KrisBecker
Copy link
Contributor

KrisBecker commented Sep 12, 2024

ISIS version(s) affected: all

My ISIS dev/test System

% lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy

Description

The dstripe application test dstripe_app_test_parallel is failing due to an ill-formed xargs command string in its regression test Makefile. This only occurs if the file path contains a X.

The dstripe_app_test_parallel app test is of the old format of ISIS regression tests where the test is managed with commands contained in a Makefile. The dstripe parallel test run in the Makefile contains the following command which causes the failure. Note the parameter -IX which causes all occurrences of X in the command to be replaced with the current line from $(INPUT)/root.lis ($PROJECT_ROOT is the base directory):

 cat $(INPUT)/root.lis | xargs -n1 -P 2 -IX $(APPNAME) from=$(INPUT)/X.cub to=$(OUTPUT)/X.dstr.cub mode=
vert vlnl=51 vhns=51 > /dev/null;

When this test is run in a directory containing a capital X in the path, it fails:

(Aug262024) sciproc01 .../build [520]:  ctest -R dstripe_app_test_parallel --output-on-failure
Test project $PROJECT_ROOT/APEX/IsisDev/Aug262024/ISIS3/build
    Start 458: dstripe_app_test_parallel
1/1 Test #458: dstripe_app_test_parallel ........***Failed    0.75 sec
CMake Deprecation Warning at $PROJECT_ROOT/APEX/IsisDev/Aug262024/ISIS3/isis/cmake/RunMakeFileTest.cmake:6 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


SOURCE FOLDER $PROJECT_ROOT/APEX/IsisDev/Aug262024/ISIS3/isis/src/base/apps/dstripe/tsts/parallel
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
**USER ERROR** The preference file $PROJECT_ROOT/APEI15240033RDR/IsisDev/Aug262024/ISIS3/build/TestPreferences was not found or does not exist in Preference.cpp at 39.
**USER ERROR** The preference file $PROJECT_ROOT/APEI22976033RDR/IsisDev/Aug262024/ISIS3/build/TestPreferences was not found or does not exist in Preference.cpp at 39.
make[2]: *** [Makefile:6: commands] Error 123
...

0% tests passed, 1 tests failed out of 1

Label Time Summary:
app    =   0.76 sec*proc (1 test)

Total Test time (real) =   0.92 sec

The following tests FAILED:
        458 - dstripe_app_test_parallel (Failed)

Note that the occurrence of APEX has been replaced with APEI15240033RDR due to xargs substitution of X with I15240033RDR, the first line from the root.lis file, which is the base file name for the test cube.

There appears to be three total make files that contain an xargs command. The dstripe test is the only one containing this particular form of argument substitution. The others contain acceptable alternatives to -IX:

% find . -name Makefile -exec fgrep -l xargs {} \;
./src/base/apps/dstripe/tsts/parallel/Makefile
./src/base/apps/pixel2map/tsts/errors/Makefile
./src/base/apps/pixel2map/tsts/multipleInputCubes/Makefile

How to reproduce

  1. Build ISIS in a path containing a X
  2. ctest -R dstripe_app_test_parallel --output-on-failure

Possible Solution

The easiest solution is to replace -IX with -I{}.

Or make dstripe callable and covert the test to run under the Google Test framework.

Additional context

@KrisBecker KrisBecker added the bug Something isn't working label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant