Skip to content

Commit

Permalink
Bug fix: Use rundir to determine executable file name in tests
Browse files Browse the repository at this point in the history
This commit fixes the issue raised in PR #2083 by @lizziel.  Integration
and parallel test execute scripts now use the run directory name and not
the absolute path to determine the executable file name.

test/integration/GCClassic/integrationTestExecute.sh
test/integration/GCHP/integrationTestExecute.sh
test/parallel/GCClassic/parallelTestExecute.sh
- Pass ${runDir} instead of ${runAbsPath} to the exe_name function.
  This will prevent integration test root paths with e.g. "rrtmg"
  from returning an incorrect executable name.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
  • Loading branch information
yantosca committed Dec 20, 2023
1 parent c5dca3a commit 684d8af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/integration/GCClassic/integrationTestExecute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ for runDir in *; do
failMsg="$runDir${FILL:${#runDir}}.....${EXE_FAIL_STR}"

# Get the executable file corresponding to this run directory
exeFile=$(exe_name "gcclassic" "${runAbsPath}")
exeFile=$(exe_name "gcclassic" "${runDir}")

# Test if the executable exists
if [[ -f "${binDir}/${exeFile}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion test/integration/GCHP/integrationTestExecute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ for runDir in *; do
failMsg="$runDir${FILL:${#runDir}}.....${EXE_FAIL_STR}"

# Get the executable file corresponding to this run directory
exeFile=$(exe_name "gchp" "${runAbsPath}")
exeFile=$(exe_name "gchp" "${runDir}")

# Test if the executable exists
if [[ -f "${binDir}/${exeFile}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/GCClassic/parallelTestExecute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ for runDir in *; do
failMsg="$runDir${FILL:${#runDir}}.....${EXE_FAIL_STR}"

# Get the executable file corresponding to this run directory
exeFile=$(exe_name "gcclassic" "${runAbsPath}")
exeFile=$(exe_name "gcclassic" "${runDir}")

# Test if the executable exists
if [[ -f "${binDir}/${exeFile}" ]]; then
Expand Down

0 comments on commit 684d8af

Please sign in to comment.