1#!/bin/sh 2 3# Regression Test Script for invoking specific targets in Makefiles 4 5USAGE="Usage: `basename $0` DIRECTORY TARGET" 6 7if [ $# -lt 2 ] ; then 8 echo "$USAGE" 9 exit 1 10fi 11 12# this is the directory where the test will be performed 13cd $1 14 15LOGFILE="$2results.log" 16touch $LOGFILE 17 18# If gpsim is crashing during the regression tests, then uncomment 19# the 'echo' to see which regression test was invoked: 20# echo "make $1 $2" 21 22# Run the simulation and save the results 23${MAKE:-make} $2 > $LOGFILE 24 25 26grep "FAILED" $LOGFILE 27if [ $? -eq 0 ] ; then 28 echo "!!! FAILED $1/make $2" 29fi 30grep "PASSED" $LOGFILE 31 32