1# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
2# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
3# retains certain rights in this software.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met:
8#
9#     * Redistributions of source code must retain the above copyright
10#       notice, this list of conditions and the following disclaimer.
11#
12#     * Redistributions in binary form must reproduce the above
13#       copyright notice, this list of conditions and the following
14#       disclaimer in the documentation and/or other materials provided
15#       with the distribution.
16#
17#     * Neither the name of Sandia Corporation nor the names of its
18#       contributors may be used to endorse or promote products derived
19#       from this software without specific prior written permission.
20#
21# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32#
33
34# script to run all tests and compare them to saved dump files.
35#
36# To run the tests with valgrind checking, uncomment the next line and comment the
37# following line. Can also define other prefixes if wanted.
38
39#set PREFIX = "valgrind --tool=memcheck"
40set PREFIX = ""
41set SRCDIR = .
42set NCDUMP = @<BINDIR>@/ncdump
43
44# testwt - single precision write test
45echo "************************************************************************"
46echo "************************************************************************"
47echo "testwt ..."
48echo "begin testwt" > test.output
49${PREFIX} ${SRCDIR}/testwt >> test.output
50echo "end testwt" >> test.output
51${NCDUMP} -d5,5 test.exo | grep -v version | diff - test.dmp | tee testwt.res
52
53# testrd - single precision read test
54echo "testrd ..."
55echo "testrd ... [Expect ex_create NOCLOBBER error from this test]"
56${PREFIX} ${SRCDIR}/testrd | grep -v version | diff - testrd.dmp | tee testrd.res
57
58# testcp_ss - single-to-single precision copy test
59echo "testcp_ss ..."
60echo "begin testcp_ss" >> test.output
61${PREFIX} ${SRCDIR}/testcp >> test.output
62echo "end testcp_ss" >> test.output
63${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - testcp_ss.dmp | tee testcp_ss.res
64
65# testcpln - single-to-single, large to normal copy test
66echo "testcpln ..."
67echo "begin testcpln" >> test.output
68${PREFIX} ${SRCDIR}/testcpln >> test.output
69echo "end testcpln" >> test.output
70${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - testcpln.dmp | tee testcpln.res
71
72# testcpnl - single-to-single, normal to large copy test
73echo "testcpnl ..."
74echo "begin testcpnl" >> test.output
75${PREFIX} ${SRCDIR}/testcpnl >> test.output
76echo "end testcpnl" >> test.output
77${NCDUMP} -d5,5 testcpnl.exo | grep -v version | diff - testcpnl.dmp | tee testcpnl.res
78
79# testwt1 - single precision write test with multiple side sets
80echo "testwt1 ..."
81echo "testwt1 ... [Expect WEDGE6 warning from this test]"
82echo "begin testwt1" >> test.output
83${PREFIX} ${SRCDIR}/testwt1 >> test.output
84echo "end testwt1" >> test.output
85${NCDUMP} -d5,5 test.exo | grep -v version | diff - test1.dmp | tee testwt1.res
86
87# testrd1 - single precision read test with multiple side sets
88echo "testrd1 ..."
89echo "testrd1 ... [Expect failure locating elem var 1 for elem block 12]"
90${PREFIX} ${SRCDIR}/testrd1 | grep -v version | diff - testrd1.dmp | tee testrd1.res
91
92# testwtd - double precision write test
93echo "testwtd ..."
94echo "begin testwtd" >> test.output
95${PREFIX} ${SRCDIR}/testwtd >> test.output
96echo "end testwtd" >> test.output
97${NCDUMP} -d5,5 test.exo | grep -v version | diff - testd.dmp | tee testwtd.res
98
99# testrdd - double precision read test
100echo "testrdd ..."
101${PREFIX} ${SRCDIR}/testrdd | grep -v version | diff - testrdd.dmp | tee testrdd.res
102
103# testwt2 - single precision write 2 files (simultaneously open) test
104echo "testwt2 ..."
105echo "begin testwt2" >> test.output
106${PREFIX} ${SRCDIR}/testwt2 >> test.output |&grep -v "property name string"
107echo "end testwt2" >> test.output
108${NCDUMP} -d5,5 test.exo | grep -v version | diff - test2-1.dmp | tee testwt2-1.res
109${NCDUMP} -d5,5 test2.exo | grep -v version | diff - test2-2.dmp | tee testwt2-2.res
110
111echo "testwt_nsid ..."
112echo "begin testwt_nsid" > test.output
113${PREFIX} ${SRCDIR}/testwt_nsid >> test.output
114echo "end testwt_nsid" >> test.output
115${NCDUMP} -d5,5 test-nsided.exo | grep -v version | diff - test-nsided.dmp | tee testwt_nsid.res
116
117# testrd_nsid - single precision read test
118echo "testrd_nsid ..."
119${PREFIX} ${SRCDIR}/testrd_nsid | grep -v version | diff - testrd_nsid.dmp | tee testrd_nsid.res
120
121# test_nem - nemesis routines
122echo "test_nem ..."
123${PREFIX} ${SRCDIR}/test_nem | diff - test_nem.dmp | tee test_nem.res
124
125echo "************************************************************************"
126echo "************************************************************************"
127
128