diff --git a/test_files/.gitignore b/test_files/.gitignore new file mode 100644 index 0000000..7219052 --- /dev/null +++ b/test_files/.gitignore @@ -0,0 +1,3 @@ +*.nc +tests_output* +cfcache-files-py3/ diff --git a/test_files/tests.sh b/test_files/tests.sh index f13592c..394af09 100755 --- a/test_files/tests.sh +++ b/test_files/tests.sh @@ -6,17 +6,21 @@ outdir=tests_output.$$ mkdir $outdir -std_name_table=http://cfconventions.org/Data/cf-standard-names/current/src/cf-standard-name-table.xml -area_table=http://cfconventions.org/Data/area-type-table/current/src/area-type-table.xml +# Pin the tables, as the tests fail if they differ. +# This can be unpinned in future MRs updating the tests. +std_name_table=https://cfconventions.org/Data/cf-standard-names/79/src/cf-standard-name-table.xml +area_table=https://cfconventions.org/Data/area-type-table/10/src/area-type-table.xml -cfchecker="cfchecks" + +cfchecker=$(which cfchecks) failed=0 echo "Unzipping input netcdf files..." gzip -d *.gz -cache_opts="-x --cache_dir /home/ros/temp/cfcache-files-py3" +mkdir -p cfcache-files-py3 +cache_opts="-x --cache_dir ./cfcache-files-py3" for file in `ls *.nc` do @@ -37,7 +41,7 @@ do $cfchecker $cache_opts -s $std_name_table -v 1.0 $file > $outdir/$file.out 2>&1 else # Run checker using the CF version specified in the conventions attribute of the file - $cfchecker $cache_opts -s $std_name_table -v auto $file > $outdir/$file.out 2>&1 + $cfchecker $cache_opts -s $std_name_table -a $area_table -v auto $file > $outdir/$file.out 2>&1 fi # Check the output against what is expected