-SCRIPT=$OUTPUT.script
-grep 'RUN:' $FILENAME | sed "s|^.*RUN:\(.*\)$|\1|g;s|%s|$SUBST|g" > $SCRIPT
-
-
-/bin/sh $SCRIPT > $OUTPUT 2>&1 || (
- echo "******************** TEST '$FILENAME' FAILED! ********************"
- echo "Command: "
- cat $SCRIPT
- echo "Output:"
- cat $OUTPUT
- rm $OUTPUT
- echo "******************** TEST '$FILENAME' FAILED! ********************"
-)
-
+for TESTFILE in "$@" ; do
+ if test `dirname $TESTFILE` = . ; then
+ if test -d "$TESTPATH" ; then
+ cd $TESTPATH
+ make check-one TESTONE="$SUBDIR$TESTFILE"
+ cd $PWD
+ else
+ echo "Can't find llvm/test directory in " `pwd`
+ fi
+ else
+ make check-one TESTONE=$TESTFILE
+ fi
+done