treewide: replace /bin/ksh93 hashbangs with /bin/sh
[unleashed-userland.git] / components / sysutils / net-snmp / run-tests
blob8c2579d7d9b0cb9f8476e70dbf75e88f3012d21e
1 #!/bin/sh -x
3 # CDDL HEADER START
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
20 # CDDL HEADER END
23 # Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
26 #pragma ident "@(#)run-tests 1.1 09/07/08 SMI"
28 # *
29 # * U.S. Government Rights - Commercial software. Government users are subject
30 # * to the Sun Microsystems, Inc. standard license agreement and applicable
31 # * provisions of the FAR and its supplements.
33 # Use is subject to license terms.
35 # This distribution may include materials developed by third parties. Sun,
36 # Sun Microsystems, the Sun logo and Solaris are trademarks or registered
37 # trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
41 # Run Net-SNMP testing kit
43 # get the arch that we are building on
44 arch=`uname -p`
46 DIR=$1
47 MACH32=$2
48 MACH64=$3
49 IPRE=usr
50 IARCH=`arch`
51 IPROC=`uname -p | grep sparc > /dev/null && echo sparcv9 || echo amd64`
52 IROOTB=/${IPRE}/bin
53 IROOTS=/${IPRE}/sbin
55 VER=${DIR}/${MACH32}
56 VER64=${DIR}/${MACH64}
58 cd ${VER}/testing
60 if [ ${IPROC} == "amd64" ]; then
61 PATH=${IROOT}/usr/sbin/i86:${IROOTB}:${IROOTS}:/usr/ccs/bin:/usr/bin:${SPRO_VROOT}/bin:/usr/sbin:/sbin:/usr/bin:/usr/etc:/usr/sbin:/etc:.:/usr/openwin/bin
62 export PATH
63 #./RUNTESTS -a > test.32.out 2>&1
64 ./RUNTESTS -a > ${VER}/test.32.out 2>&1
65 if [ $? -ne 0 ]; then
66 echo ""
67 echo "=================================================================="
68 echo "======= Tests failed for i386 architecture ===================="
69 echo "======= see test.32.out in ================="
70 echo "=================================================================="
71 echo ""
74 PATH=${IROOT}/usr/sbin/amd64:${IROOT}/usr/bin:/usr/ccs/bin:/usr/bin:${SPRO_VROOT}/bin:/usr/sbin:/sbin:/usr/bin:/usr/etc:/usr/sbin:/etc:.:/usr/openwin/bin
75 export PATH
76 cd ${VER64}/testing
77 ./RUNTESTS -a > ${VER64}/test.64.out 2>&1
78 if [ $? -ne 0 ]; then
79 echo ""
80 echo "=================================================================="
81 echo "======= Tests failed for AMD architecture ===================="
82 echo "======= see test.64.out in $testdir ================="
83 echo "=================================================================="
84 echo ""
88 if [ ${IPROC} == "sparcv9" ]; then
89 cd ${VER64}/testing
90 PATH=${IROOT}/usr/sbin:${IROOT}/usr/bin:/usr/ccs/bin:/usr/bin:${SPRO_VROOT}/bin:/usr/sbin:/sbin:/usr/bin:/usr/etc:/usr/sbin:/etc:.:/usr/openwin/bin
91 export PATH
92 ./RUNTESTS -a > ${VER64}/test.64.out 2>&1
93 if [ $? -ne 0 ]; then
94 echo ""
95 echo "=================================================================="
96 echo "======= Tests failed for SPARC architecture ===================="
97 echo "======= see test.64.out in $testdir ================="
98 echo "=================================================================="
99 echo ""