File: run_tests.sh

package info (click to toggle)
netcdf-parallel 1%3A4.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 105,352 kB
  • sloc: ansic: 229,114; sh: 11,180; yacc: 2,561; makefile: 1,390; lex: 1,173; xml: 173; awk: 2
file content (29 lines) | stat: -rwxr-xr-x 1,110 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
# This shell script runs the ncdump tests.
# Ed Hartnett, Dennis Heimbigner

if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../test_common.sh

set -e
echo ""
echo "*** Testing ncgen and ncdump using some test CDL files."
echo "*** creating tst_small.nc from ref_tst_small.cdl..."
${NCGEN} -b -o tst_small.nc $srcdir/ref_tst_small.cdl
echo "*** creating tst_small.cdl from tst_small.nc..."
${NCDUMP} tst_small.nc > tst_small.cdl
diff -b -w tst_small.cdl $srcdir/ref_tst_small.cdl

echo "*** creating test0_ncdump.nc from test0.cdl..."
${NCGEN} -o test0_ncdump.nc -b $srcdir/test0.cdl
echo "*** creating test1_ncdump.cdl from test0_ncdump.nc..."
${NCDUMP} -n test1_ncdump test0_ncdump.nc > test1_ncdump.cdl
echo "*** creating test1_ncdump.nc from test1_ncdump.cdl..."
${NCGEN} -b test1_ncdump.cdl
echo "*** creating test2_ncdump.cdl from test1_ncdump.nc..."
${NCDUMP} test1_ncdump.nc > test2_ncdump.cdl
echo "*** checking that test1_ncdump.cdl and test2_ncdump.cdl are the same..."
diff -b -w test1_ncdump.cdl test2_ncdump.cdl

echo "*** All tests of ncgen and ncdump using test0.cdl passed!"
exit 0