components/net-snmp-57/run-tests
changeset 5867 445e2cf1c845
parent 1679 51291a5fd692
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/net-snmp-57/run-tests	Fri Dec 11 03:49:26 2015 -0800
@@ -0,0 +1,102 @@
+#!/bin/ksh93 -x
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
+#
+#
+#pragma ident	"@(#)run-tests	1.1	09/07/08 SMI"
+#
+# *
+# * U.S. Government Rights - Commercial software. Government users are subject
+# * to the Sun Microsystems, Inc. standard license agreement and applicable
+# * provisions of the FAR and its supplements.
+#
+# Use is subject to license terms.
+#
+# This distribution may include materials developed by third parties. Sun,
+# Sun Microsystems, the Sun logo and Solaris are trademarks or registered
+#  trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
+#
+#
+
+# Run Net-SNMP testing kit
+
+# get the arch that we are building on
+arch=`uname -p`
+
+DIR=$1
+MACH32=$2
+MACH64=$3
+IPRE=usr
+IARCH=`arch`
+IPROC=`uname -p | grep sparc > /dev/null && echo sparcv9 || echo amd64`
+IROOTB=/${IPRE}/bin
+IROOTS=/${IPRE}/sbin
+
+VER=${DIR}/${MACH32}
+VER64=${DIR}/${MACH64}
+
+cd ${VER}/testing
+
+if [ ${IPROC} == "amd64" ]; then
+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
+export PATH
+#./RUNTESTS -a > test.32.out 2>&1
+./RUNTESTS -a > ${VER}/test.32.out 2>&1
+if [ $? -ne 0 ]; then
+	echo ""
+	echo "=================================================================="
+	echo "=======      Tests failed for i386 architecture ===================="
+	echo "=======          see test.32.out in           ================="
+	echo "=================================================================="
+	echo ""
+fi
+
+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
+export PATH
+cd ${VER64}/testing
+./RUNTESTS -a > ${VER64}/test.64.out 2>&1
+if [ $? -ne 0 ]; then
+	echo ""
+	echo "=================================================================="
+	echo "=======      Tests failed for AMD architecture ===================="
+	echo "=======          see test.64.out in $testdir ================="
+	echo "=================================================================="
+	echo ""
+fi
+fi
+
+if [ ${IPROC} == "sparcv9" ]; then
+cd ${VER64}/testing
+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
+export PATH
+./RUNTESTS -a > ${VER64}/test.64.out 2>&1
+if [ $? -ne 0 ]; then
+        echo ""
+        echo "=================================================================="
+        echo "=======      Tests failed for SPARC architecture ===================="
+        echo "=======          see test.64.out in $testdir ================="
+        echo "=================================================================="
+        echo ""
+fi
+fi
+