From 6dcaaf4f6445c6e71e59a417ea62b43fd32ad78d Mon Sep 17 00:00:00 2001 From: Caleb Sitton Date: Wed, 15 Jan 2025 14:56:00 -0600 Subject: [PATCH 1/3] Coverage check returns exit code from testing --- coverage_scripts/check_py_coverage.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/coverage_scripts/check_py_coverage.sh b/coverage_scripts/check_py_coverage.sh index dceb14d3..84a5c13f 100644 --- a/coverage_scripts/check_py_coverage.sh +++ b/coverage_scripts/check_py_coverage.sh @@ -16,7 +16,8 @@ EXTRA="--source=${SOURCE_DIRS[@]} --omit=${OMIT_FILES[@]} --parallel-mode " export COVERAGE_FILE=`pwd`/.coverage coverage erase -($RAVEN_DIR/run_tests "$@" --re=HERON/tests --python-command="coverage run $EXTRA " || echo run_tests done but some tests failed) +($RAVEN_DIR/run_tests "$@" --re=HERON/tests --python-command="coverage run $EXTRA ") +TESTS_SUCCESS=$? ## Prepare data and generate the html documents coverage combine @@ -24,3 +25,10 @@ coverage html # See report_py_coverage.sh file for explanation of script separation (bash $HERON_DIR/coverage_scripts/report_py_coverage.sh --data-file=$COVERAGE_FILE --coverage-rc-file=$COVERAGE_RCFILE) + +if [ $TESTS_SUCCESS -ne 0 ] +then + echo "run_tests finished but some tests failed" +fi + +exit $TESTS_SUCCESS From 1cfa353221fb5994d60e82c8605007a9fcf43a82 Mon Sep 17 00:00:00 2001 From: Caleb Sitton Date: Wed, 15 Jan 2025 15:10:06 -0600 Subject: [PATCH 2/3] Messed up gold file to check github action --- .../mechanics/ramp_freq/gold/Sweep_Runs_o/dispatch_print.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration_tests/mechanics/ramp_freq/gold/Sweep_Runs_o/dispatch_print.csv b/tests/integration_tests/mechanics/ramp_freq/gold/Sweep_Runs_o/dispatch_print.csv index 10187221..32f4dfc8 100644 --- a/tests/integration_tests/mechanics/ramp_freq/gold/Sweep_Runs_o/dispatch_print.csv +++ b/tests/integration_tests/mechanics/ramp_freq/gold/Sweep_Runs_o/dispatch_print.csv @@ -8,5 +8,5 @@ RAVEN_sample_ID,Time,_ROM_Cluster,Year,scaling,Dispatch__npp__production__steam, 0,6,0,0,1.0,3.003003003e-05,1e-05,-3.003003003e-05,0.0,-1e-05,1e-05,1.0,1.0,1 0,7,0,0,1.0,300.30033033,100.00001,-300.30033033,99.99999,-200.0,200.0,1.0,1.0,1 0,8,0,0,1.0,600.600630631,200.00001,-600.600630631,199.99999,-400.0,400.0,1.0,1.0,1 -0,9,0,0,1.0,300.30033033,100.00001,-300.30033033,99.99999,-200.0,200.0,1.0,1.0,1 +0,9,0,0,1.0,300.30033033,100.00001,-3000.30033033,99.99999,-200.0,200.0,1.0,1.0,1 0,10,0,0,1.0,3.003003003e-05,1e-05,-3.003003003e-05,0.0,-1e-05,1e-05,1.0,1.0,1 From 2028c36dfe6c8e3606287fea56d903aba05f4f84 Mon Sep 17 00:00:00 2001 From: Caleb Sitton Date: Thu, 16 Jan 2025 11:10:44 -0600 Subject: [PATCH 3/3] Correcting back to original gold file --- .../mechanics/ramp_freq/gold/Sweep_Runs_o/dispatch_print.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration_tests/mechanics/ramp_freq/gold/Sweep_Runs_o/dispatch_print.csv b/tests/integration_tests/mechanics/ramp_freq/gold/Sweep_Runs_o/dispatch_print.csv index 32f4dfc8..10187221 100644 --- a/tests/integration_tests/mechanics/ramp_freq/gold/Sweep_Runs_o/dispatch_print.csv +++ b/tests/integration_tests/mechanics/ramp_freq/gold/Sweep_Runs_o/dispatch_print.csv @@ -8,5 +8,5 @@ RAVEN_sample_ID,Time,_ROM_Cluster,Year,scaling,Dispatch__npp__production__steam, 0,6,0,0,1.0,3.003003003e-05,1e-05,-3.003003003e-05,0.0,-1e-05,1e-05,1.0,1.0,1 0,7,0,0,1.0,300.30033033,100.00001,-300.30033033,99.99999,-200.0,200.0,1.0,1.0,1 0,8,0,0,1.0,600.600630631,200.00001,-600.600630631,199.99999,-400.0,400.0,1.0,1.0,1 -0,9,0,0,1.0,300.30033033,100.00001,-3000.30033033,99.99999,-200.0,200.0,1.0,1.0,1 +0,9,0,0,1.0,300.30033033,100.00001,-300.30033033,99.99999,-200.0,200.0,1.0,1.0,1 0,10,0,0,1.0,3.003003003e-05,1e-05,-3.003003003e-05,0.0,-1e-05,1e-05,1.0,1.0,1