|
1 #!/bin/ksh93 -x |
|
2 # |
|
3 # CDDL HEADER START |
|
4 # |
|
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. |
|
8 # |
|
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. |
|
13 # |
|
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] |
|
19 # |
|
20 # CDDL HEADER END |
|
21 # |
|
22 # |
|
23 # Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. |
|
24 # |
|
25 # |
|
26 #pragma ident "@(#)run-tests 1.1 09/07/08 SMI" |
|
27 # |
|
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. |
|
32 # |
|
33 # Use is subject to license terms. |
|
34 # |
|
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. |
|
38 # |
|
39 # |
|
40 |
|
41 # Run Net-SNMP testing kit |
|
42 |
|
43 # get the arch that we are building on |
|
44 arch=`uname -p` |
|
45 |
|
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 |
|
54 |
|
55 VER=${DIR}/${MACH32} |
|
56 VER64=${DIR}/${MACH64} |
|
57 |
|
58 cd ${VER}/testing |
|
59 |
|
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 "" |
|
72 fi |
|
73 |
|
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 "" |
|
85 fi |
|
86 fi |
|
87 |
|
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 "" |
|
100 fi |
|
101 fi |
|
102 |