File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ function setup_test_env() {
1818
1919 # Create an empty param.bash and add the mock paths to it
2020 > " param.bash"
21- cp run_proc.bash " $TMP_DIR /run_proc.bash"
21+ # cp run_proc.bash "$TMP_DIR/run_proc.bash"
2222 echo " export MARINE_VAL=$TMP_DIR " >> " param.bash"
2323 echo " export MSKPATH=$TMP_DIR /MESH_MASK_DIR" >> " param.bash"
2424 echo " export CDFPATH=$TMP_DIR /CDFTOOLS_DIR/bin" >> " param.bash"
Original file line number Diff line number Diff line change 11#! /bin/bash
2- set -e
2+ set -ex
33
44echo " --- Test 1: A valid run ---"
55
@@ -9,25 +9,27 @@ source ./tests/run_test_setup.bash
99echo " Setting up test environment..."
1010setup_test_env
1111
12- echo " Changing to temporary directory..."
13- cd " $TMP_DIR "
12+ # echo "Changing to temporary directory..."
13+ # cd "$TMP_DIR"
14+
15+ JOBOUT=" $TMP_DIR /test_valid_run_out.txt"
1416
1517echo " Running the process with valid parameters..."
16- source ./run_proc.bash -B bathy.nc -C 1 mesh_mask.nc 2020 2020 1m RUNID_TEST > output.txt 2>&1
18+ source ./run_proc.bash -B bathy.nc -C 1 mesh_mask.nc 2020 2020 1m RUNID_TEST > " $JOBOUT " 2>&1
1719
18- if ! grep -q " MOCK SBATCH: --output=.*mk_msks.out /.*/mk_msks.bash" output.txt ; then
20+ if ! grep -q " MOCK SBATCH: --output=.*mk_msks.out /.*/mk_msks.bash" " $JOBOUT " ; then
1921 echo " Test failed: Expected 'mk_msks.bash' job was not submitted."
2022 cleanup_test_env
2123 exit 1
2224fi
2325
24- if ! grep -q " MOCK SBATCH: --job-name=moo_1m_grid-._20200101 --output=.*moo_1m_grid-._20200101.out /.*/get_data.bash" output.txt ; then
26+ if ! grep -q " MOCK SBATCH: --job-name=moo_1m_grid-._20200101 --output=.*moo_1m_grid-._20200101.out /.*/get_data.bash" " $JOBOUT " ; then
2527 echo " Test failed: Expected a data retrieval job to be submitted."
2628 cleanup_test_env
2729 exit 1
2830fi
2931
30- if ! grep -q " data processing is done for RUNID_TEST between 2020 and 2020" output.txt ; then
32+ if ! grep -q " data processing is done for RUNID_TEST between 2020 and 2020" " $JOBOUT " ; then
3133 echo " Test failed: Expected success message not found."
3234 cleanup_test_env
3335 exit 1
You can’t perform that action at this time.
0 commit comments