components/net-snmp/run-tests
author gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
Fri, 20 May 2011 12:17:45 +0530
changeset 252 ee0fb1eabcbf
child 1650 ce501c11d5fa
permissions -rw-r--r--
7041085 move net-snmp to userland

#!/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, 2011, 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