2 #############################################################################
4 # This Cplant(TM) source code is the property of Sandia National
7 # This Cplant(TM) source code is copyrighted by Sandia National
10 # The redistribution of this Cplant(TM) source code is subject to the
11 # terms of the GNU Lesser General Public License
12 # (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html)
14 # Cplant(TM) Copyright 1998-2003 Sandia Corporation.
15 # Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
16 # license for use of this work by or on behalf of the US Government.
17 # Export of this program may require a license from the United States
20 #############################################################################
23 # This library is free software; you can redistribute it and/or
24 # modify it under the terms of the GNU Lesser General Public
25 # License as published by the Free Software Foundation; either
26 # version 2.1 of the License, or (at your option) any later version.
28 # This library is distributed in the hope that it will be useful,
29 # but WITHOUT ANY WARRANTY; without even the implied warranty of
30 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31 # Lesser General Public License for more details.
33 # You should have received a copy of the GNU Lesser General Public
34 # License along with this library; if not, write to the Free Software
35 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
37 # Questions or comments about this library should be sent to:
40 # Sandia National Laboratories, New Mexico
42 # Albuquerque, NM 87185-1110
46 ############################################################################
48 # File: test_copy.bash
50 # Description: Script to exercise the sysio library.
56 # 1. Doesn't exercise all of sysio.
57 # 2. Uses hardcoded /native prefix for file names which may not be the
60 ############################################################################
62 # defaults - change as necessary for local system
65 SRC=${CWD}/test_copy.src
66 DEST=${CWD}/test_copy.dest
69 # main processing logic follows
74 echo "Could not remove $SRC - test INDETERMINATE" >> $SCRATCH
79 echo "Could not remove $DEST - test INDETERMINATE" >> $SCRATCH
83 if ( ! cp /usr/include/stdio.h $SRC ) # just picked something handy
85 echo "Could not create source file - test INDETERMINATE" >> $SCRATCH
93 ./test_copy ${PREFIX}/${SRC} ${PREFIX}/${DEST}
94 SRC_VERF=`cksum $SRC | awk '{ print $1 }'`
95 DEST_VERF=`cksum $DEST | awk '{ print $1 }'`
96 if [ "$SRC_VERF" -ne "$DEST_VERF" ]
98 echo "The source and destination files did not match; test FAILED" >> $SCRATCH 2>&1
100 echo "The source and destination files matched; test PASSED" >> $SCRATCH 2>&1
104 # Report test results
108 if grep "FAILED" $SCRATCH > /dev/null
110 echo "TEST $0 FAILED - found failed"
113 elif test `grep -c "PASSED" $SCRATCH` -ne $PASSCNT > /dev/null
115 echo "TEST $0 FAILED - wrong pass count"
119 echo "TEST $0 PASSED"
124 if [ -z "$NOCLEANUP" ]
126 rm -f $SCRATCH $SRC $DEST