run_WE2E_tests.sh
does not run the intended tests on Hera if COMPILER is not explicitly set
#571
Labels
bug
Something isn't working
Expected behavior
The
run_WE2E_tests.sh
script should check to see if the following pre-defined file lists exist in the directoryufs-srweather-app/tests/WE2E/machine_suites/
, in order of priority:${test_type}.${machine}.${compiler}.nco
${test_type}.${machine}.${compiler}.com
${test_type}.${machine}.${compiler}
${test_type}.${machine}
${test_type}
So on Hera, running the fundamental tests with no other flags should run the tests found in the file
fundamental.hera.intel.nco
, since that file exists inmachine_suites/
and it is first in the priority list. If the user specifies "--compiler=gnu", then the tests infundamental.hera.gnu.com
should be run.Current behavior
With commit d03e646 (PR #477), the logic for checking the set of "fundamental" or "comprehensive" tests to run has been broken. The current logic assumes that "compiler" has been set, but if the user has not provided the argument then the default value will not have been filled in yet. So running the fundamental tests on, for example, Hera without specifying the compiler will default to the set of tests listed in
machine_suites/fundamental
, rather than the intendedmachine_suites/fundamental.hera.intel.nco
, because ${compiler} will resolve as an empty string, meaning the logic looks forfundamental.hera..nco
, which does not exist. Likewise,fundamental.hera..nco
,fundamental.hera.
, andfundamental.hera
do not exist, so finally the logic settles on the tests found inmachine_suites/fundamental
.If
compiler=intel
orcompiler=gnu
is explicitly set, the correct set of tests is used.Machines affected
This logic will be broken if compiler is not explicitly set for any platform with a compiler-specific test suite for the default compiler; currently this is only Hera.
Steps To Reproduce
On Hera, run the WE2E tests without using the
compiler=
flag:Observe that the set of tests run is incorrect:
This is the list of tests specified in
machine_suites/fundamental
, rather than the intended tests inmachine_suites/fundamental.hera.intel.nco
.Detailed Description of Fix (optional)
The logic filling in default values for input arguments should be moved earlier to before this logic.
The new python-based script (#558) does not suffer from this error, so when that is adopted this problem will go away.
Additional Information
Note: As I have previously mentioned, Il do not think that this testing strategy is a good idea. The "fundamental" set of tests should be the same on each platform for consistency, and it should be a small subset of tests checking the "most important" functionality of the workflow to ensure that nothing major has been broken, regardless of which platform is used for development/testing. But I felt it was important to point out that the intended functionality is currently broken.
The text was updated successfully, but these errors were encountered: