diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index 4e51f579..79ba9a6c 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -105,7 +105,7 @@ jobs: export CFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' export FCFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' export FFLAGS='-Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0' - cmake .. -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data + cmake .. -DFTP_TEST_FILES=ON -DFTP_LARGE_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data make VERBOSE=1 ctest --verbose --output-on-failure --rerun-failed gcovr --root .. -v --html-details --exclude ../tests --exclude CMakeFiles --print-summary -o test-coverage.html &> /dev/null diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 378fbc5b..62f35f6e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -90,5 +90,11 @@ copy_test_data(ref_WW3_Regional_US_West_Coast_20220718_0000.grib2.inv) shell_test(run_wgrib2_tests) if (FTP_TEST_FILES) + copy_test_data(ref_WW3_Regional_US_West_Coast_20220718_0000.grib2.inv) shell_test(run_wgrib2_ftp_tests) -endif() \ No newline at end of file +endif() + +if (FTP_LARGE_TEST_FILES) + copy_test_data(ref_rrfs.t18z.prslev.f000.grib2.inv) + shell_test(run_wgrib2_large_ftp_tests) +endif() diff --git a/tests/run_wgrib2_ftp_large_tests.sh b/tests/run_wgrib2_ftp_large_tests.sh new file mode 100755 index 00000000..c6896401 --- /dev/null +++ b/tests/run_wgrib2_ftp_large_tests.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# This is an optional test script for the wgrib2 project. +# Requires FTP_LARGE_TEST_FILES=ON +# +# Alyson Stahl, 4/17/24 + +set -e +echo "" +echo "*** Running wgrib2 tests on large FTP test files" + +echo "*** Running an inventory test on a large FTP test file" +../wgrib2/wgrib2 data/rrfs.t18z.prslev.f000.grib2 > ftp_inv2.txt +cat ftp_inv2.txt +cmp ftp_inv2.txt data/ref_rrfs.t18z.prslev.f000.grib2.inv + +echo "*** SUCCESS!" +exit 0 + diff --git a/tests/run_wgrib2_ftp_tests.sh b/tests/run_wgrib2_ftp_tests.sh index c122e52f..d55c52cf 100644 --- a/tests/run_wgrib2_ftp_tests.sh +++ b/tests/run_wgrib2_ftp_tests.sh @@ -1,5 +1,6 @@ #!/bin/sh # This is an optional test script for the wgrib2 project. +# Requires FTP_TEST_FILES=ON # # Alyson Stahl, 4/17/24 @@ -7,15 +8,11 @@ set -e echo "" echo "*** Running wgrib2 tests on FTP test files" -# Run an inventory on test files. +echo "*** Running an inventory test with FTP test file" ../wgrib2/wgrib2 data/WW3_Regional_US_West_Coast_20220718_0000.grib2 > ftp_inv1.txt cat ftp_inv1.txt cmp ftp_inv1.txt data/ref_WW3_Regional_US_West_Coast_20220718_0000.grib2.inv -#../wgrib2/wgrib2 data/rrfs.t18z.prslev.f000.grib2 > ftp_inv2.txt -#cat ftp_inv2.txt -#cmp ftp_inv2.txt data/ref_rrfs.t18z.prslev.f000.grib2.inv - echo "*** SUCCESS!" exit 0