| 1 |
# Copyright(C) 1999-2020 National Technology & Engineering Solutions |
| 2 |
# of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
# NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
# |
| 5 |
# See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
# script to run all tests and compare them to saved dump files. |
| 8 |
# |
| 9 |
# To run the tests with valgrind checking, uncomment the next line and comment the |
| 10 |
# following line. Can also define other prefixes if wanted. |
| 11 |
|
| 12 |
if ($#argv == 0) then |
| 13 |
set NCDUMP = `which ncdump` |
| 14 |
else |
| 15 |
set NCDUMP = $1 |
| 16 |
endif |
| 17 |
|
| 18 |
#set PREFIX = "valgrind --tool=memcheck" |
| 19 |
set PREFIX = "" |
| 20 |
set SRCDIR = . |
| 21 |
set DIFF = "diff -w" |
| 22 |
echo "************************************************************************" |
| 23 |
echo "************************************************************************" |
| 24 |
rm -f test.output |
| 25 |
echo "testwt - single precision write test..." |
| 26 |
echo "begin testwt" > test.output |
| 27 |
${PREFIX} ${SRCDIR}/testwt >> test.output |
| 28 |
echo "end testwt" >> test.output |
| 29 |
${NCDUMP} -d5,5 test.exo | grep -v version | ${DIFF} - ${SRCDIR}/test.dmp | tee testwt.res |
| 30 |
|
| 31 |
echo "testrd - single precision read test..." |
| 32 |
echo "begin testrd" >> test.output |
| 33 |
${PREFIX} ${SRCDIR}/testrd | grep -v version | ${DIFF} - ${SRCDIR}/testrd.dmp | tee testrd.res |
| 34 |
echo "end testrd" >> test.output |
| 35 |
|
| 36 |
echo "testcp_ss - single-to-single precision copy test..." |
| 37 |
echo "begin testcp_ss" >> test.output |
| 38 |
${PREFIX} ${SRCDIR}/testcp >> test.output |
| 39 |
echo "end testcp_ss" >> test.output |
| 40 |
${NCDUMP} -d5,5 testcp.exo | grep -v version | ${DIFF} - ${SRCDIR}/testcp_ss.dmp | tee testcp_ss.res |
| 41 |
|
| 42 |
echo "testcp_sd - single-to-double precision copy test..." |
| 43 |
echo "begin testcp_sd" >> test.output |
| 44 |
${PREFIX} ${SRCDIR}/testcpd >> test.output |
| 45 |
echo "end testcp_sd" >> test.output |
| 46 |
${NCDUMP} -d5,5 testcpd.exo | grep -v version | ${DIFF} - ${SRCDIR}/testcp_sd.dmp | tee testcp_sd.res |
| 47 |
|
| 48 |
echo "testcp_ln - large model to normal model single precision copy test..." |
| 49 |
echo "begin testcp_ln" >> test.output |
| 50 |
${PREFIX} ${SRCDIR}/testcp_ln >> test.output |
| 51 |
echo "end testcp_ln" >> test.output |
| 52 |
${NCDUMP} -d5,5 testcp.exo | grep -v version | ${DIFF} - ${SRCDIR}/testcp_ln.dmp | tee testcp_ln.res |
| 53 |
|
| 54 |
echo "testcp_nl - normal_model to large_model single precision copy test..." |
| 55 |
echo "begin testcp_nl" >> test.output |
| 56 |
${PREFIX} ${SRCDIR}/testcp_nl >> test.output |
| 57 |
echo "end testcp_nl" >> test.output |
| 58 |
${NCDUMP} -d5,5 testcp_nl.exo | grep -v version | ${DIFF} - ${SRCDIR}/testcp_nl.dmp | tee testcp_nl.res |
| 59 |
|
| 60 |
echo "testwt_clb - single precision write test using concatenated puts..." |
| 61 |
echo "begin testwt_clb" >> test.output |
| 62 |
${PREFIX} ${SRCDIR}/testwt_clb >> test.output |
| 63 |
echo "end testwt_clb" >> test.output |
| 64 |
${NCDUMP} -d5,5 test.exo | grep -v version | ${DIFF} - ${SRCDIR}/test_clb.dmp | tee testwt_clb.res |
| 65 |
|
| 66 |
echo "testwtd - double precision write test..." |
| 67 |
echo "begin testwtd" >> test.output |
| 68 |
${PREFIX} ${SRCDIR}/testwtd >> test.output |
| 69 |
echo "end testwtd" >> test.output |
| 70 |
${NCDUMP} -d5,5 test.exo | grep -v version | ${DIFF} - ${SRCDIR}/testd.dmp | tee testwtd.res |
| 71 |
|
| 72 |
echo "testrdd - double precision read test..." |
| 73 |
echo "begin testrdd" >> test.output |
| 74 |
${PREFIX} ${SRCDIR}/testrdd | grep -v version | ${DIFF} - ${SRCDIR}/testrdd.dmp | tee testrdd.res |
| 75 |
echo "end testrdd" >> test.output |
| 76 |
|
| 77 |
echo "testcp_dd - double-to-double precision copy test..." |
| 78 |
echo "begin testcp_dd" >> test.output |
| 79 |
${PREFIX} ${SRCDIR}/testcpd >> test.output |
| 80 |
echo "end testcp_dd" >> test.output |
| 81 |
${NCDUMP} -d5,5 testcpd.exo | grep -v version | ${DIFF} - ${SRCDIR}/testcp_dd.dmp | tee testcp_dd.res |
| 82 |
|
| 83 |
echo "testcp_ds - double-to-single precision copy test..." |
| 84 |
echo "begin testcp_ds" >> test.output |
| 85 |
${PREFIX} ${SRCDIR}/testcp >> test.output |
| 86 |
echo "end testcp_ds" >> test.output |
| 87 |
${NCDUMP} -d5,5 testcp.exo | grep -v version | ${DIFF} - ${SRCDIR}/testcp_ds.dmp | tee testcp_ds.res |
| 88 |
|
| 89 |
echo "testwt1 - single precision write files with several side sets..." |
| 90 |
echo "testwt1 ... [Expect WEDGE6 warning from this test]" |
| 91 |
echo "begin testwt1" >> test.output |
| 92 |
${PREFIX} ${SRCDIR}/testwt1 >> test.output |
| 93 |
echo "end testwt1" >> test.output |
| 94 |
${NCDUMP} -d5,5 test.exo | grep -v version | ${DIFF} - ${SRCDIR}/test1.dmp | tee testwt1.res |
| 95 |
|
| 96 |
echo "testrd1 - single precision read test of a file with several side sets..." |
| 97 |
echo "testrd1 ... [Expect file create failure error, NOCLOBBER]" |
| 98 |
echo "testrd1 ... [Expect failure locating elem var 1 for elem block 12]" |
| 99 |
echo "begin testrd1" >> test.output |
| 100 |
${PREFIX} ${SRCDIR}/testrd1 | grep -v version | ${DIFF} - ${SRCDIR}/testrd1.dmp | tee testrd1.res |
| 101 |
echo "end testrd1" >> test.output |
| 102 |
|
| 103 |
echo "testwt_ss - write files to test side sets..." |
| 104 |
echo "testwt_ss ... [Expect WEDGE6 warning from this test]" |
| 105 |
echo "begin testwt_ss" >> test.output |
| 106 |
${PREFIX} ${SRCDIR}/testwt_ss >> test.output |
| 107 |
echo "end testwt_ss" >> test.output |
| 108 |
${NCDUMP} -d5,5 test.exo | grep -v version | ${DIFF} - ${SRCDIR}/testwt_ss.dmp | tee testwt_ss.res |
| 109 |
|
| 110 |
echo "testrd_ss - read test of a file with several side sets..." |
| 111 |
echo "testrd_ss ... [Expect warning for NULL sidesets 30 and 31]" |
| 112 |
echo "begin testrd_ss" >> test.output |
| 113 |
${PREFIX} ${SRCDIR}/testrd_ss | grep -v version | ${DIFF} - ${SRCDIR}/testrd_ss.dmp | tee testrd_ss.res |
| 114 |
echo "end testrd_ss" >> test.output |
| 115 |
|
| 116 |
echo "testwt2 - single precision write 2 files (simultaneously open) test..." |
| 117 |
echo "begin testwt2" >> test.output |
| 118 |
${PREFIX} ${SRCDIR}/testwt2 >> test.output |
| 119 |
echo "end testwt2" >> test.output |
| 120 |
${NCDUMP} -d5,5 test.exo | grep -v version | ${DIFF} - ${SRCDIR}/test2-1.dmp | tee testwt2-1.res |
| 121 |
${NCDUMP} -d5,5 test2.exo | grep -v version | ${DIFF} - ${SRCDIR}/test2-2.dmp | tee testwt2-2.res |
| 122 |
|
| 123 |
echo "testrdwt - read from one and write to another (simultaneously open) file..." |
| 124 |
echo "begin testrdwt" >> test.output |
| 125 |
${PREFIX} ${SRCDIR}/testrdwt >> test.output |
| 126 |
echo "end testrdwt" >> test.output |
| 127 |
${NCDUMP} -d5,5 test2.exo | grep -v version | ${DIFF} - ${SRCDIR}/test2.dmp | tee testrdwt.res |
| 128 |
|
| 129 |
echo "testwt_nc - write x y z components of coordinates separately..." |
| 130 |
echo "begin testwt_nc" >> test.output |
| 131 |
${PREFIX} ${SRCDIR}/testwt_nc >> test.output |
| 132 |
echo "end testwt_nc" >> test.output |
| 133 |
${NCDUMP} -d5,5 test.exo | grep -v version | ${DIFF} - ${SRCDIR}/test.dmp | tee testwt_nc.res |
| 134 |
|
| 135 |
echo "testrd_nc - read x y z components of coordinates separately..." |
| 136 |
echo "begin testrd_nc" >> test.output |
| 137 |
${PREFIX} ${SRCDIR}/testrd_nc | grep -v version | ${DIFF} - ${SRCDIR}/testrd_nc.dmp | tee testrd_nc.res |
| 138 |
echo "end testrd" >> test.output |
| 139 |
|
| 140 |
echo "testwt-zeron - write file with zero nodes and elements..." |
| 141 |
echo "begin testwt-zeron" >> test.output |
| 142 |
${PREFIX} ${SRCDIR}/testwt-zeron >> test.output |
| 143 |
echo "end testwt-zeron" >> test.output |
| 144 |
${NCDUMP} -d5,5 test.exo | grep -v version | ${DIFF} - ${SRCDIR}/testwt-zeron.dmp | tee testwt-zeron.res |
| 145 |
|
| 146 |
echo "testrd - read test of file with zero nodes and elements..." |
| 147 |
echo "begin testrd zero nodes" >> test.output |
| 148 |
${PREFIX} ${SRCDIR}/testrd | grep -v version | ${DIFF} - ${SRCDIR}/testrd_zeron.dmp | tee testrd_zeron.res |
| 149 |
echo "end testrd zero nodes" >> test.output |
| 150 |
|
| 151 |
echo "testwt-zeroe - write file with zero elements..." |
| 152 |
echo "begin testwt-zeroe" >> test.output |
| 153 |
${PREFIX} ${SRCDIR}/testwt-zeroe >> test.output |
| 154 |
echo "end testwt-zeroe" >> test.output |
| 155 |
${NCDUMP} -d5,5 test.exo | grep -v version | ${DIFF} - ${SRCDIR}/testwt-zeroe.dmp | tee testwt-zeroe.res |
| 156 |
|
| 157 |
echo "testrd - read test of file with zero elements..." |
| 158 |
echo "begin testrd zero elements" >> test.output |
| 159 |
${PREFIX} ${SRCDIR}/testrd | grep -v version | ${DIFF} - ${SRCDIR}/testrd_zeroe.dmp | tee testrd_zeroe.res |
| 160 |
echo "end testrd zero elements" >> test.output |
| 161 |
|
| 162 |
echo "testwt-one-attrib - read/write test of element attributes - read one at a time..." |
| 163 |
echo "begin testwt-one-attrib - read attributes one at a time" >> test.output |
| 164 |
${PREFIX} ${SRCDIR}/testwt-one-attrib | tee testrd_zeroe.res |
| 165 |
echo "end testwt-one-attrib - read attributes one at a time" >> test.output |
| 166 |
|
| 167 |
echo "testwt-nsided - write file with nsided elements..." |
| 168 |
echo "begin testwt-nsided" >> test.output |
| 169 |
${PREFIX} ${SRCDIR}/testwt-nsided >> test.output |
| 170 |
echo "end testwt-nsided" >> test.output |
| 171 |
${NCDUMP} -d5,5 test-nsided.exo | grep -v version | ${DIFF} - ${SRCDIR}/testwt-nsided.dmp | tee testwt-nsided.res |
| 172 |
|
| 173 |
echo "testrd-nsided - read file with nsided elements..." |
| 174 |
echo "begin testrd-nsided" >> test.output |
| 175 |
${PREFIX} ${SRCDIR}/testrd-nsided | grep -v version | ${DIFF} - ${SRCDIR}/testrd-nsided.dmp | tee testrd-nsided.res |
| 176 |
echo "end testrd-nsided" >> test.output |
| 177 |
|
| 178 |
echo "testwt-nfaced - write file with nfaced elements..." |
| 179 |
echo "begin testwt-nfaced" >> test.output |
| 180 |
${PREFIX} ${SRCDIR}/testwt-nfaced >> test.output |
| 181 |
echo "end testwt-nfaced" >> test.output |
| 182 |
${NCDUMP} -d5,5 test-nfaced.exo | grep -v version | ${DIFF} - ${SRCDIR}/testwt-nfaced.dmp | tee testwt-nfaced.res |
| 183 |
|
| 184 |
echo "testrd-nfaced - read file with nfaced elements..." |
| 185 |
echo "begin testrd-nfaced" >> test.output |
| 186 |
${PREFIX} ${SRCDIR}/testrd-nfaced | grep -v version | ${DIFF} - ${SRCDIR}/testrd-nfaced.dmp | tee testrd-nfaced.res |
| 187 |
echo "end testrd-nfaced" >> test.output |
| 188 |
|
| 189 |
echo "testwt-long-name - write file with long (64-character) names..." |
| 190 |
echo "begin testwt-long-name" >> test.output |
| 191 |
${PREFIX} ${SRCDIR}/testwt-long-name >> test.output |
| 192 |
echo "end testwt-long-name" >> test.output |
| 193 |
${NCDUMP} -d5,5 test.exo | grep -v version | ${DIFF} - ${SRCDIR}/testwt-long-name.dmp | tee testwt-long-name.res |
| 194 |
|
| 195 |
echo "testrd - read long name file truncating to 32 characters on read..." |
| 196 |
echo "begin testrd (truncate)" >> test.output |
| 197 |
${PREFIX} ${SRCDIR}/testrd | grep -v version | ${DIFF} - ${SRCDIR}/testrd-nm32.dmp | tee testrd-nm32.res |
| 198 |
echo "end testrd (truncate)" >> test.output |
| 199 |
|
| 200 |
echo "testrd-long-name - read long name file..." |
| 201 |
echo "begin testrd-long-name" >> test.output |
| 202 |
${PREFIX} ${SRCDIR}/testrd-long-name | grep -v version | ${DIFF} - ${SRCDIR}/testrd-long-name.dmp | tee testrd-long-name.res |
| 203 |
echo "end testrd-long-name" >> test.output |
| 204 |
|
| 205 |
echo "test_nemesis - read long name file..." |
| 206 |
echo "begin test_nemesis" >> test.output |
| 207 |
${PREFIX} ${SRCDIR}/test_nemesis | grep -v version | ${DIFF} - ${SRCDIR}/test_nemesis.dmp | tee test_nemesis.res |
| 208 |
echo "end test_nemesis" >> test.output |
| 209 |
|
| 210 |
echo "************************************************************************" |
| 211 |
echo "************************************************************************" |