Skip to content

Commit

Permalink
test should avoid failure if packing type not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
AlysonStahl-NOAA committed May 7, 2024
1 parent 289a4df commit bf71601
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Linux_options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,6 @@ jobs:
cd wgrib2
mkdir b
cd b
cmake ${{ matrix.config.options }} -DUSE_JASPER=ON -DCMAKE_PREFIX_PATH="~/sp;~/ip;~/ip2" ..
cmake ${{ matrix.config.options }} -DUSE_JASPER=ON -DCMAKE_PREFIX_PATH="~/sp;~/ip;~/ip2;~/jasper" ..
make VERBOSE=1
ctest --verbose --output-on-failure --rerun-failed
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 -DUSE_JASPER=ON
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
14 changes: 8 additions & 6 deletions tests/run_wgrib2_aec_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,14 @@ if [ "$cksum1" != "$cksum9" ] ; then
fi

echo "*** Converting from aec to jpeg"
../wgrib2/wgrib2 junk_aec.grb -set_grib_type jpeg -grib_out junk_jpeg.grb
cksum10=`../wgrib2/wgrib2 junk_jpeg.grb -text - | cksum`

if [ "$cksum1" != "$cksum10" ] ; then
echo "failed for converting to jpeg packing"
exit 1
if ../wgrib2/wgrib2 junk_aec.grb -set_grib_type jpeg -grib_out junk_jpeg.grb;
cksum10=`../wgrib2/wgrib2 junk_jpeg.grb -text - | cksum`
if [ "$cksum1" != "$cksum10" ] ; then
echo "failed for converting to jpeg packing"
exit 1
fi
else
echo "Use of jpeg not enabled. Skipping test."
fi

echo "*** Checking use of set_grib_type same"
Expand Down

0 comments on commit bf71601

Please sign in to comment.