Debian Codegraph @

packages/seacas/libraries/exoIIv2for32/test/testall_i64.in

raw
1 #! /usr/bin/env bash
2 # Copyright(C) 1999-2021 National Technology & Engineering Solutions
3 # of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
4 # NTESS, the U.S. Government retains certain rights in this software.
5 #
6 # See packages/seacas/LICENSE for details
7
8 # script to run all tests and compare them to saved dump files.
9 #
10 # To run the tests with valgrind checking, uncomment the next line and comment the
11 # following line. Can also define other prefixes if wanted.
12
13 if [ "$1" == "netcdf4" ]; then
14 export EXODUS_NETCDF4=quiet
15 fi
16
17 #PREFIX = "valgrind --tool=memcheck"
18 PREFIX=""
19 SUFFIX=""
20 BINDIR=@CMAKE_CURRENT_BINARY_DIR@
21 SRCDIR=@CMAKE_CURRENT_SOURCE_DIR@
22 NCDUMP=@NETCDF_NCDUMP@
23 DIFF="diff -w"
24
25 ret_status=0
26
27 # testwt - single precision write test
28 echo "************************************************************************"
29 echo "************************************************************************"
30 rm -f test.output
31 echo "testwt ..."
32 echo "begin testwt" > test.output
33 ${PREFIX} ${BINDIR}/f32_testwt${SUFFIX} >> test.output
34 ret_status=$((ret_status+$?))
35 ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue | grep -v "word_size" | ${DIFF} - ${SRCDIR}/test.dmp | tee testwt.res
36 ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[4]}))
37 echo "end testwt, status = $ret_status" >> test.output
38
39 # testrdd - double precision read test with 64-bit integers
40 echo "testrddi64 ..."
41 ${PREFIX} ${BINDIR}/f32_testrddi64${SUFFIX} | grep -v version | grep -v int64_status| grep -v _FillValue | grep -v "word_size" | ${DIFF} - ${SRCDIR}/testrddi64.dmp | tee testrddi64.res
42 ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]}))
43
44 # testwtd - double precision write test
45 echo "testwtd ..."
46 echo "begin testwtd" >> test.output
47 ${PREFIX} ${BINDIR}/f32_testwtd${SUFFIX} >> test.output
48 ret_status=$((ret_status+$?))
49 ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue | grep -v "word_size" | ${DIFF} - ${SRCDIR}/testd.dmp | tee testwtd.res
50 ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[4]}))
51 echo "end testwtd, status = $ret_status" >> test.output
52
53 # testrdd - double precision read test with 64-bit integers
54 echo "testrddi64 ..."
55 ${PREFIX} ${BINDIR}/f32_testrddi64${SUFFIX} | grep -v version | grep -v int64_status| grep -v _FillValue | grep -v "word_size" | ${DIFF} - ${SRCDIR}/testrddi64.dmp | tee testrddi64.res
56 ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]}))
57
58 # testwtdi64 - double precision write test with 64-bit integers
59 echo "testwtdi64 ..."
60 echo "begin testwtdi64" >> test.output
61 ${PREFIX} ${BINDIR}/f32_testwtdi64${SUFFIX} >> test.output
62 ret_status=$((ret_status+$?))
63 ${NCDUMP} -d5,5 test.exo | grep -v version | grep -v int64_status| grep -v _FillValue | grep -v "word_size" | ${DIFF} - ${SRCDIR}/testdi64.dmp | tee testwtd.res
64 ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[4]}))
65 echo "end testwtdi64, status = $ret_status" >> test.output
66
67 # testrdd - double precision read test with 64-bit integers
68 echo "testrddi64 ..."
69 ${PREFIX} ${BINDIR}/f32_testrddi64${SUFFIX} | grep -v version | grep -v int64_status| grep -v _FillValue | grep -v "word_size" | ${DIFF} - ${SRCDIR}/testrddi64.dmp | tee testrddi64.res
70 ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]}))
71
72 # testrdd - double precision read test
73 echo "testrdd ..."
74 ${PREFIX} ${BINDIR}/f32_testrdd${SUFFIX} | grep -v version | grep -v int64_status| grep -v _FillValue | grep -v "word_size" | ${DIFF} - ${SRCDIR}/testrdd.dmp | tee testrdd.res
75 ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]}))
76
77 # testrd - single precision read of double precision file
78 echo "testrd ..."
79 ${PREFIX} ${BINDIR}/f32_testrd${SUFFIX} | grep -v version | grep -v int64_status| grep -v _FillValue | grep -v "word_size" | ${DIFF} - ${SRCDIR}/testrd.dmp | tee testrd.res
80 ret_status=$((ret_status+${PIPESTATUS[0]}+${PIPESTATUS[5]}))
81
82 echo "************************************************************************"
83 echo "************************************************************************"
84
85 exit $ret_status