2N/A#!/bin/ksh93 -x
2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2N/A#
2N/A# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A#
2N/A#
2N/A#pragma ident "@(#)run-tests 1.1 09/07/08 SMI"
2N/A#
2N/A# *
2N/A# * U.S. Government Rights - Commercial software. Government users are subject
2N/A# * to the Sun Microsystems, Inc. standard license agreement and applicable
2N/A# * provisions of the FAR and its supplements.
2N/A#
2N/A# Use is subject to license terms.
2N/A#
2N/A# This distribution may include materials developed by third parties. Sun,
2N/A# Sun Microsystems, the Sun logo and Solaris are trademarks or registered
2N/A# trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
2N/A#
2N/A#
2N/A
2N/A# Run Net-SNMP testing kit
2N/A
2N/A# get the arch that we are building on
2N/Aarch=`uname -p`
2N/A
2N/ADIR=$1
2N/AMACH32=$2
2N/AMACH64=$3
2N/AIPRE=usr
2N/AIARCH=`arch`
2N/AIPROC=`uname -p | grep sparc > /dev/null && echo sparcv9 || echo amd64`
2N/AIROOTB=/${IPRE}/bin
2N/AIROOTS=/${IPRE}/sbin
2N/A
2N/AVER=${DIR}/${MACH32}
2N/AVER64=${DIR}/${MACH64}
2N/A
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