# Copyright(C) 1999-2020 National Technology & Engineering Solutions # of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with # NTESS, the U.S. Government retains certain rights in this software. # # See packages/seacas/LICENSE for details # script to run all tests and compare them to saved dump files. # # To run the tests with valgrind checking, uncomment the next line and comment the # following line. Can also define other prefixes if wanted. #set PREFIX = "valgrind --tool=memcheck" set PREFIX = "" SRCDIR=/Users/gdsjaar/src/seacas/build/packages/seacas/libraries/exodus/test NCDUMP=/Users/gdsjaar/src/seacas/bin/ncdump echo "************************************************************************" echo "************************************************************************" rm -f test.output echo "testwt - single precision write test..." echo "begin testwt" > test.output ${PREFIX} ${SRCDIR}/testwt >> test.output echo "end testwt" >> test.output ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue |grep -v maximum_name_length > ${SRCDIR}/test.dmp echo "testrd - single precision read test..." echo "begin testrd" >> test.output ${PREFIX} ${SRCDIR}/testrd | grep -v version > ${SRCDIR}/testrd.dmp echo "end testrd" >> test.output echo "testrdv - single precision read test with varid..." echo "begin testrdv" >> test.output ${PREFIX} ${SRCDIR}/testrdv | grep -v version > ${SRCDIR}/testrdv.dmp echo "end testrdv" >> test.output echo "testcp_ss - single-to-single precision copy test..." echo "begin testcp_ss" >> test.output ${PREFIX} ${SRCDIR}/testcp >> test.output echo "end testcp_ss" >> test.output ${NCDUMP} -d5,5 testcp.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testcp_ss.dmp echo "testcp_sd - single-to-double precision copy test..." echo "begin testcp_sd" >> test.output ${PREFIX} ${SRCDIR}/testcpd >> test.output echo "end testcp_sd" >> test.output ${NCDUMP} -d5,5 testcpd.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testcp_sd.dmp echo "testcp_ln - large model to normal model single precision copy test..." echo "begin testcp_ln" >> test.output ${PREFIX} ${SRCDIR}/testcp_ln >> test.output echo "end testcp_ln" >> test.output ${NCDUMP} -d5,5 testcp.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testcp_ln.dmp echo "testcp_nl - normal_model to large_model single precision copy test..." echo "begin testcp_nl" >> test.output ${PREFIX} ${SRCDIR}/testcp_nl >> test.output echo "end testcp_nl" >> test.output ${NCDUMP} -d5,5 testcp_nl.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testcp_nl.dmp echo "testwt_clb - single precision write test using concatenated puts..." echo "begin testwt_clb" >> test.output ${PREFIX} ${SRCDIR}/testwt_clb >> test.output echo "end testwt_clb" >> test.output ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/test_clb.dmp echo "testwtd - double precision write test..." echo "begin testwtd" >> test.output ${PREFIX} ${SRCDIR}/testwtd >> test.output echo "end testwtd" >> test.output ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testd.dmp echo "testrdd - double precision read test..." echo "begin testrdd" >> test.output ${PREFIX} ${SRCDIR}/testrdd | grep -v version >- ${SRCDIR}/testrdd.dmp echo "end testrdd" >> test.output echo "testcp_dd - double-to-double precision copy test..." echo "begin testcp_dd" >> test.output ${PREFIX} ${SRCDIR}/testcpd >> test.output echo "end testcp_dd" >> test.output ${NCDUMP} -d5,5 testcpd.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testcp_dd.dmp echo "testcp_ds - double-to-single precision copy test..." echo "begin testcp_ds" >> test.output ${PREFIX} ${SRCDIR}/testcp >> test.output echo "end testcp_ds" >> test.output ${NCDUMP} -d5,5 testcp.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testcp_ds.dmp echo "testwt1 - single precision write files with several side sets..." echo "testwt1 ... [Expect WEDGE6 warning from this test]" echo "begin testwt1" >> test.output ${PREFIX} ${SRCDIR}/testwt1 >> test.output echo "end testwt1" >> test.output ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/test1.dmp echo "testrd1 - single precision read test of a file with several side sets..." echo "testrd1 ... [Expect file create failure error, NOCLOBBER]" echo "testrd1 ... [Expect failure locating elem var 1 for elem block 12]" echo "begin testrd1" >> test.output ${PREFIX} ${SRCDIR}/testrd1 | grep -v version > ${SRCDIR}/testrd1.dmp echo "end testrd1" >> test.output echo "testwt_ss - write files to test side sets..." echo "testwt_ss ... [Expect WEDGE6 warning from this test]" echo "begin testwt_ss" >> test.output ${PREFIX} ${SRCDIR}/testwt_ss >> test.output echo "end testwt_ss" >> test.output ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testwt_ss.dmp echo "testrd_ss - read test of a file with several side sets..." echo "testrd_ss ... [Expect warning for NULL sidesets 30 and 31]" echo "begin testrd_ss" >> test.output ${PREFIX} ${SRCDIR}/testrd_ss | grep -v version > ${SRCDIR}/testrd_ss.dmp echo "end testrd_ss" >> test.output echo "testwt2 - single precision write 2 files (simultaneously open) test..." echo "begin testwt2" >> test.output ${PREFIX} ${SRCDIR}/testwt2 >> test.output echo "end testwt2" >> test.output ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/test2-1.dmp ${NCDUMP} -d5,5 test2.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/test2-2.dmp echo "testrdwt - read from one and write to another (simultaneously open) file..." echo "begin testrdwt" >> test.output ${PREFIX} ${SRCDIR}/testrdwt >> test.output echo "end testrdwt" >> test.output ${NCDUMP} -d5,5 test2.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/test2.dmp echo "testwt_nc - write x y z components of coordinates separately..." echo "begin testwt_nc" >> test.output ${PREFIX} ${SRCDIR}/testwt_nc >> test.output echo "end testwt_nc" >> test.output ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/test.dmp echo "testrd_nc - read x y z components of coordinates separately..." echo "begin testrd_nc" >> test.output ${PREFIX} ${SRCDIR}/testrd_nc | grep -v version > ${SRCDIR}/testrd_nc.dmp echo "end testrd" >> test.output echo "testwt-zeron - write file with zero nodes and elements..." echo "begin testwt-zeron" >> test.output ${PREFIX} ${SRCDIR}/testwt-zeron >> test.output echo "end testwt-zeron" >> test.output ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testwt-zeron.dmp echo "testrd - read test of file with zero nodes and elements..." echo "begin testrd zero nodes" >> test.output ${PREFIX} ${SRCDIR}/testrd | grep -v version > ${SRCDIR}/testrd_zeron.dmp echo "end testrd zero nodes" >> test.output echo "testwt-zeroe - write file with zero elements..." echo "begin testwt-zeroe" >> test.output ${PREFIX} ${SRCDIR}/testwt-zeroe >> test.output echo "end testwt-zeroe" >> test.output ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testwt-zeroe.dmp echo "testrd - read test of file with zero elements..." echo "begin testrd zero elements" >> test.output ${PREFIX} ${SRCDIR}/testrd | grep -v version > ${SRCDIR}/testrd_zeroe.dmp echo "end testrd zero elements" >> test.output echo "testwt-one-attrib - read/write test of element attributes - read one at a time..." echo "begin testwt-one-attrib - read attributes one at a time" >> test.output ${PREFIX} ${SRCDIR}/testwt-one-attrib | tee testrd_zeroe.res echo "end testwt-one-attrib - read attributes one at a time" >> test.output echo "testwt-nsided - write file with nsided elements..." echo "begin testwt-nsided" >> test.output ${PREFIX} ${SRCDIR}/testwt-nsided >> test.output echo "end testwt-nsided" >> test.output ${NCDUMP} -d5,5 test-nsided.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testwt-nsided.dmp echo "testrd-nsided - read file with nsided elements..." echo "begin testrd-nsided" >> test.output ${PREFIX} ${SRCDIR}/testrd-nsided | grep -v version > ${SRCDIR}/testrd-nsided.dmp echo "end testrd-nsided" >> test.output echo "testwt-nfaced - write file with nfaced elements..." echo "begin testwt-nfaced" >> test.output ${PREFIX} ${SRCDIR}/testwt-nfaced >> test.output echo "end testwt-nfaced" >> test.output ${NCDUMP} -d5,5 test-nfaced.exo | grep -v version | grep -v int64_status| grep -v _FillValue > ${SRCDIR}/testwt-nfaced.dmp echo "testrd-nfaced - read file with nfaced elements..." echo "begin testrd-nfaced" >> test.output ${PREFIX} ${SRCDIR}/testrd-nfaced | grep -v version > ${SRCDIR}/testrd-nfaced.dmp echo "end testrd-nfaced" >> test.output echo "testwt-long-name - write file with long (64-character) names..." echo "begin testwt-long-name" >> test.output ${PREFIX} ${SRCDIR}/testwt-long-name >> test.output echo "end testwt-long-name" >> test.output ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue ${SRCDIR}/testwt-long-name.dmp echo "testrd - read long name file truncating to 32 characters on read..." echo "begin testrd (truncate)" >> test.output ${PREFIX} ${SRCDIR}/testrd | grep -v version > ${SRCDIR}/testrd-nm32.dmp echo "end testrd (truncate)" >> test.output echo "testrd-long-name - read long name file..." echo "begin testrd-long-name" >> test.output ${PREFIX} ${SRCDIR}/testrd-long-name | grep -v version > ${SRCDIR}/testrd-long-name.dmp echo "end testrd-long-name" >> test.output echo "************************************************************************" echo "************************************************************************"