#!/bin/ksh
# $XConsortium: run_tests,v 1.0 93/11/22 12:49:00 rws Exp $
#
#       NOTICE TO USER: The source code in this file is copyrighted under
#       U.S. and international laws.  SunSoft, Inc., a Sun Microsystems,
#       Inc. business of Mountain View, California owns the copyright.
#       Users and possessors of this source code are hereby granted a
#       nonexclusive, royalty-free copyright and design patent license
#       to use this code in individual and commercial software.
#
#       Any use of this source code must include, in the user documentation
#       and internal comments to the code, notices to the end user as follows:
# 
#(c) Copyright 1992, 1993 SunSoft, Inc., a Sun Microsystems, Inc. business.
#
#       SUNSOFT, INC. AND SUN MICROSYSTEMS, INC. MAKE NO REPRESENTATIONS
#       ABOUT THE SUITABILITY OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS
#       PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
#       SUNSOFT, INC., AND SUN MICROSYSTEMS, INC., SEVERALLY AND
#       INDIVIDUALLY, DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOURCE
#       CODE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
#       FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUNSOFT, INC.
#       OR SUN MICROSYSTEMS, INC., BE LIABLE FOR ANY SPECIAL, INDIRECT,
#       INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
#       RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
#       OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
#       OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE.
#

unset PAUSE

TESTS=" \
	cell edgeAttr encTextAttr \
        fa faData fasData faset font \
        interior intrAttr \
        line lineAttr lineSet markerAttr \
        multiDraw nurbCurve nurbSurf pfline quadMesh \
	sendoc shade sofas startoc struct \
        textAttr textExtent triStrip twoCircles"

if [ $RUN_IMM = 1 ]
then
    # set up image path for IMM mode testing

    REF_IMAGE_DIR=$REF_IMM; export REF_IMAGE_DIR
    CUR_IMAGE_DIR=$CUR_IMM; export CUR_IMAGE_DIR
    BAD_IMAGE_DIR=$BAD_IMM; export BAD_IMAGE_DIR

    echo "\n# Running Immediate Mode Tests\n"
    for test in $TESTS
    do
	$EXECUTE_TEST $test -i 
    done
fi

if [ $RUN_STR = 1 ]
then
    # set up image path for STR mode testing

    REF_IMAGE_DIR=$REF_STR; export REF_IMAGE_DIR
    CUR_IMAGE_DIR=$CUR_STR; export CUR_IMAGE_DIR
    BAD_IMAGE_DIR=$BAD_STR; export BAD_IMAGE_DIR

    echo "\n# Running Structure Mode Tests\n"
    for test in $TESTS
    do
	$EXECUTE_TEST $test -s 
    done
    fi
fi



if [ $RUN_FULL = 1]
then
    if [ $RUN_PWS = 1 ]
    then
        # set up image path for PWS mode testing

        REF_IMAGE_DIR=$REF_IMAGE_DIR_PWS; export REF_IMAGE_DIR
        CUR_IMAGE_DIR=$CUR_IMAGE_DIR_PWS; export CUR_IMAGE_DIR
        BAD_IMAGE_DIR=$BAD_IMAGE_DIR_PWS; export BAD_IMAGE_DIR

        echo "\n# Running PWS Mode Tests\n"
        for test in $TESTS
        do
	    $EXECUTE_TEST $test -p 
        done
    fi
fi


