Skip to content

Commit

Permalink
Added more tests using FTP (#124)
Browse files Browse the repository at this point in the history
* Added FTP fetch and test

* Update CMakeLists.txt

* Updated CMakeLists.txt for FTP fetch

* Added test for large data file

* Fixed Comment

* Added FTP tests to developer workflow

* Removing large test file from test script for now

* enabled large test files

* typo

* test file was extra large test file

* removing ftp_large_test_files from developer workflow for now

* large test files

* fixing accidentally overwritten changes

* more tests with ftp files

---------

Co-authored-by: Edward Hartnett <38856240+edwardhartnett@users.noreply.github.com>
  • Loading branch information
AlysonStahl-NOAA and edwardhartnett authored May 9, 2024
1 parent a928f5d commit a5a5bea
Show file tree
Hide file tree
Showing 8 changed files with 260,839 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 -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
21 changes: 19 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ if(FTP_TEST_FILES)
set(G2_FTP_URL "https://ftp.emc.ncep.noaa.gov/static_files/public/NCEPLIBS-g2")

# These are the test data files.
set(FTP_FILES WW3_Regional_US_West_Coast_20220718_0000.grib2)
# These are the test data files.
set(FTP_FILES WW3_Regional_US_West_Coast_20220718_0000.grib2
WW3_Regional_US_East_Coast_20220717_0600.grib2
gep19.t00z.pgrb2a.0p50_bcf144 geavg.t00z.pgrb2a.0p50_mecomf144
gec00.t00z.pgrb2a.0p50.f144 gegfs.t00z.pgrb2a.0p50.f144
gegfs.t00z.pgrb2a.0p50_mef144 gep19.t00z.pgrb2a.0p50.f144
gdas.t12z.pgrb2.1p00.anl.grib2 blend.t19z.core.f001.co.grib2
aqm.t12z.max_8hr_o3.227.grib2 seaice.t00z.grb.grib2)

# User may also ask for large test file.
if(FTP_LARGE_TEST_FILES)
Expand All @@ -85,7 +92,6 @@ copy_test_data(gdaswave.t00z.wcoast.0p16.f000.grib2)
copy_test_data(ref_gdaswave.t00z.wcoast.0p16.f000.grib2.inv)
copy_test_data(ref_npts_gdaswave.t00z.wcoast.0p16.f000.grib2.txt)
copy_test_data(tmp_int.grb)
copy_test_data(ref_WW3_Regional_US_West_Coast_20220718_0000.grib2.inv)
copy_test_data(gdas.t12z.pgrb2.1p00.anl.75r.grib2)
copy_test_data(ref_wind.gdas.t12z.pgrb2.1p00.anl.75r.grib2.inv)
copy_test_data(ref_uv.gdas.t12z.pgrb2.1p00.anl.75r.grib2.inv)
Expand All @@ -107,5 +113,16 @@ if (USE_AEC)
endif()

if (FTP_TEST_FILES)
copy_test_data(ref_WW3_Regional_US_West_Coast_20220718_0000.grib2.inv)
copy_test_data(ref_merge_fcst.aqm.t12z.max_8hr_o3.227.grib2.txt)
copy_test_data(ref_HGT.500_mb.ENS=low-res_ctl.2023043000_2023050600.asc)
shell_test(run_wgrib2_ftp_tests)
if (FTP_LARGE_TEST_FILES)
copy_test_data(ref_fv3lam.t00z.prslev.f000.grib2.inv)
shell_test(run_ftp_large_tests)
endif()
if (FTP_EXTRA_TEST_FILES)
copy_test_data(ref_rrfs.t18z.prslev.f000.grib2.inv)
shell_test(run_ftp_extra_large_tests)
endif()
endif()
Loading

0 comments on commit a5a5bea

Please sign in to comment.