2018-08-12 23:01:08 -06:00
|
|
|
#!/bin/sh
|
2017-11-25 07:28:07 -07:00
|
|
|
# Tests for ncgen4 using list of test cdl files from the cdl4
|
|
|
|
# directory, and comparing output to expected results in the expected4
|
|
|
|
# directory. Note that these tests are run for classic files in
|
|
|
|
# tst_ncgen4_classic.sh
|
|
|
|
# Dennis Heimbigner
|
2017-03-08 17:01:10 -07:00
|
|
|
|
2018-04-20 14:40:28 -06:00
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
2017-03-08 17:01:10 -07:00
|
|
|
. ../test_common.sh
|
|
|
|
|
2010-06-03 13:24:43 +00:00
|
|
|
set -e
|
|
|
|
|
2013-07-10 21:19:05 +00:00
|
|
|
# To add a new test,
|
|
|
|
# 1. put the .cdl file in the 'cdl4' directory
|
|
|
|
# 2. put the result of running ncgen then ncdump
|
|
|
|
# into the directory 'expected4' as .dmp
|
2014-09-18 18:26:06 -06:00
|
|
|
# 3. Modify the file tst_ncgen_shared.sh to add
|
2013-07-10 21:19:05 +00:00
|
|
|
# the test to the end of the TESTS4 variable
|
2013-09-20 20:31:21 -06:00
|
|
|
# 4. Add the new files into cdl4/Makefile.am
|
2018-04-20 14:40:28 -06:00
|
|
|
# and expected4/Makefile.am
|
2013-07-10 21:19:05 +00:00
|
|
|
|
2017-11-25 07:28:07 -07:00
|
|
|
verbose=1
|
2010-06-03 13:24:43 +00:00
|
|
|
export verbose
|
|
|
|
|
|
|
|
KFLAG=3 ; export KFLAG
|
2012-06-12 21:50:02 +00:00
|
|
|
echo "*** Performing diff tests: k=3"
|
2018-04-20 14:40:28 -06:00
|
|
|
bash ${srcdir}/tst_ncgen4_diff.sh
|
2012-06-12 21:50:02 +00:00
|
|
|
echo "*** Performing cycle tests: k=3"
|
2018-04-20 14:40:28 -06:00
|
|
|
bash ${srcdir}/tst_ncgen4_cycle.sh
|
2010-06-03 13:24:43 +00:00
|
|
|
KFLAG=4 ; export KFLAG
|
2012-06-12 21:50:02 +00:00
|
|
|
echo "*** Performing diff tests: k=4"
|
2018-04-20 14:40:28 -06:00
|
|
|
bash ${srcdir}/tst_ncgen4_diff.sh
|
2012-06-12 21:50:02 +00:00
|
|
|
echo "*** Performing cycle tests: k=4"
|
2018-04-20 14:40:28 -06:00
|
|
|
bash ${srcdir}/tst_ncgen4_cycle.sh
|
2017-11-17 08:22:49 -07:00
|
|
|
rm -rf ${RESULTSDIR}
|
2017-11-25 07:28:07 -07:00
|
|
|
echo "SUCCESS!!"
|
|
|
|
exit 0
|