Skip to content

Commit

Permalink
enabled large test files
Browse files Browse the repository at this point in the history
  • Loading branch information
AlysonStahl-NOAA committed May 1, 2024
1 parent e4901a7 commit 24da50a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/developer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
endif()

if (FTP_LARGE_TEST_FILES)
copy_test_data(ref_rrfs.t18z.prslev.f000.grib2.inv)
shell_test(run_wgrib2_large_ftp_tests)
endif()
18 changes: 18 additions & 0 deletions tests/run_wgrib2_ftp_large_tests.sh
Original file line number Diff line number Diff line change
@@ -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

7 changes: 2 additions & 5 deletions tests/run_wgrib2_ftp_tests.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
#!/bin/sh
# This is an optional test script for the wgrib2 project.
# Requires FTP_TEST_FILES=ON
#
# Alyson Stahl, 4/17/24

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

0 comments on commit 24da50a

Please sign in to comment.