Skip to content

Commit

Permalink
Back to shell script, but should fail if any test fails
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPincus committed Jan 3, 2024
1 parent e00e4d8 commit bb69e2e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,8 @@ optical_prop_unit_tests : $(LIB_DEPS) mo_testing_utils.o optical_prop_unit_test
.PHONY: tests
tests:
cp ${RRTMGP_DATA}/examples/rfmip-clear-sky/inputs/multiple_input4MIPs_radiation_RFMIP_UColorado-RFMIP-1-2_none.nc ./test_atmospheres.nc
$(RUN_CMD) (./optical_prop_unit_tests && ./rte_unit_tests && \
./check_equivalence test_atmospheres.nc ${RRTMGP_DATA}/rrtmgp-gas-lw-g128.nc && \
./check_equivalence test_atmospheres.nc ${RRTMGP_DATA}/rrtmgp-gas-sw-g224.nc && \
./check_equivalence test_atmospheres.nc ${RRTMGP_DATA}/rrtmgp-gas-sw-g112.nc && \
./check_variants test_atmospheres.nc ${RRTMGP_DATA}/rrtmgp-gas-lw-g256.nc ${RRTMGP_DATA}/rrtmgp-gas-lw-g128.nc && \
./check_variants test_atmospheres.nc ${RRTMGP_DATA}/rrtmgp-gas-sw-g224.nc ${RRTMGP_DATA}/rrtmgp-gas-sw-g112.nc )
$(RUN_CMD) bash all_tests.sh


check:
echo "Nothing to check in tests/"
Expand Down
8 changes: 8 additions & 0 deletions tests/all_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set -e
./optical_prop_unit_tests
./rte_unit_tests
./check_equivalence test_atmospheres.nc ${RRTMGP_DATA}/rrtmgp-gas-lw-g128.nc
./check_equivalence test_atmospheres.nc ${RRTMGP_DATA}/rrtmgp-gas-sw-g224.nc
./check_equivalence test_atmospheres.nc ${RRTMGP_DATA}/rrtmgp-gas-sw-g112.nc
./check_variants test_atmospheres.nc ${RRTMGP_DATA}/rrtmgp-gas-lw-g256.nc ${RRTMGP_DATA}/rrtmgp-gas-lw-g128.nc
./check_variants test_atmospheres.nc ${RRTMGP_DATA}/rrtmgp-gas-sw-g224.nc ${RRTMGP_DATA}/rrtmgp-gas-sw-g112.nc

0 comments on commit bb69e2e

Please sign in to comment.