2018-08-13 13:01:08 +08:00
|
|
|
#!/bin/sh
|
2017-11-25 22:28:07 +08: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-09 08:01:10 +08:00
|
|
|
|
2018-04-21 04:40:28 +08:00
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
2017-03-09 08:01:10 +08:00
|
|
|
. ../test_common.sh
|
|
|
|
|
2010-06-03 21:24:43 +08:00
|
|
|
set -e
|
|
|
|
|
2013-07-11 05:19:05 +08: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-19 08:26:06 +08:00
|
|
|
# 3. Modify the file tst_ncgen_shared.sh to add
|
2013-07-11 05:19:05 +08:00
|
|
|
# the test to the end of the TESTS4 variable
|
2013-09-21 10:31:21 +08:00
|
|
|
# 4. Add the new files into cdl4/Makefile.am
|
2018-04-21 04:40:28 +08:00
|
|
|
# and expected4/Makefile.am
|
2013-07-11 05:19:05 +08:00
|
|
|
|
2017-11-25 22:28:07 +08:00
|
|
|
verbose=1
|
2010-06-03 21:24:43 +08:00
|
|
|
export verbose
|
|
|
|
|
|
|
|
KFLAG=3 ; export KFLAG
|
2012-06-13 05:50:02 +08:00
|
|
|
echo "*** Performing diff tests: k=3"
|
2018-04-21 04:40:28 +08:00
|
|
|
bash ${srcdir}/tst_ncgen4_diff.sh
|
2012-06-13 05:50:02 +08:00
|
|
|
echo "*** Performing cycle tests: k=3"
|
2018-04-21 04:40:28 +08:00
|
|
|
bash ${srcdir}/tst_ncgen4_cycle.sh
|
2010-06-03 21:24:43 +08:00
|
|
|
KFLAG=4 ; export KFLAG
|
2012-06-13 05:50:02 +08:00
|
|
|
echo "*** Performing diff tests: k=4"
|
2018-04-21 04:40:28 +08:00
|
|
|
bash ${srcdir}/tst_ncgen4_diff.sh
|
2012-06-13 05:50:02 +08:00
|
|
|
echo "*** Performing cycle tests: k=4"
|
2018-04-21 04:40:28 +08:00
|
|
|
bash ${srcdir}/tst_ncgen4_cycle.sh
|
2017-11-17 23:22:49 +08:00
|
|
|
rm -rf ${RESULTSDIR}
|
2017-11-25 22:28:07 +08:00
|
|
|
echo "SUCCESS!!"
|
|
|
|
exit 0
|