[llvm-commits] CVS: reopt/test/run-tests
Brian Gaeke
gaeke at cs.uiuc.edu
Wed Jul 21 13:18:56 PDT 2004
Changes in directory reopt/test:
run-tests updated: 1.13 -> 1.14
---
Log message:
Add a skip-trace command line option.
Make it so I don't have to add all of my private SingleSource/Reoptimizer
tests individually.
---
Diffs of the changes: (+29 -17)
Index: reopt/test/run-tests
diff -u reopt/test/run-tests:1.13 reopt/test/run-tests:1.14
--- reopt/test/run-tests:1.13 Tue Jul 20 17:54:10 2004
+++ reopt/test/run-tests Wed Jul 21 15:18:46 2004
@@ -16,6 +16,7 @@
fi
# parse arguments
+skiptrace=0
outputonly=0
action=test
for arg in $@; do
@@ -25,16 +26,29 @@
-debug) action=debug ;;
-test) action=test ;;
-list) action=list ;;
+ -skiptrace=*) skiptrace=`echo $arg|sed 's/^-skiptrace=//'` ;;
*) benchmk=$arg ;;
esac
done
+# get full path to test/Programs subdirectory
+objroot=`gmake prdirs | egrep 'LLVM.*Object Root' |cut -d: -f2-`
+
+EXTRATESTSUBDIR=SingleSource/Reoptimizer
+EXTRATESTDIR=${objroot}/test/Programs/$EXTRATESTSUBDIR
# sanity check arguments
if [ "$action" = "list" ]; then
echo ""
echo "SUPPORTED TESTS:"
echo "----------------"
- grep SUBDIR= $0 | egrep -v '(exec|grep)' | sed 's/) / /' | sed 's/;.*$//'
+ grep SUBDIR= $0 | egrep -v '(exec|grep|ucname)' | sed 's/) / /' | sed 's/;.*$//'
+ if [ -d $EXTRATESTDIR ]; then
+ for d in ${EXTRATESTDIR}/*; do
+ arg=`basename $d | tr A-Z a-z`
+ ucname=`echo $arg | perl -pe '$_ = ucfirst lc $_;'`
+ echo " $arg SUBDIR=$EXTRATESTSUBDIR/$ucname"
+ done
+ fi
exit 0
fi
if [ -z "$benchmk" ]; then
@@ -43,6 +57,9 @@
if [ \( $outputonly -ne 0 \) -a \( "$action" != "clean" \) ]; then
die "Error: -output only meaningful w/ -clean"
fi
+if [ \( $skiptrace -ne 0 \) -a \( "$action" != "test" \) ]; then
+ die "Error: -skiptrace=N only meaningful when running a test"
+fi
# choose from among the programs we know of (sets SUBDIR and spectest)
spectest=0
@@ -54,30 +71,21 @@
stanford) SUBDIR=SingleSource/Benchmarks/Stanford ;;
olden) SUBDIR=MultiSource/Benchmarks/Olden ;;
- ary3) SUBDIR=SingleSource/Reoptimizer/Ary3 ;;
- sieve) SUBDIR=SingleSource/Reoptimizer/Sieve ;;
- lists) SUBDIR=SingleSource/Reoptimizer/Lists ;;
- strcat) SUBDIR=SingleSource/Reoptimizer/Strcat ;;
- mynestedloop) SUBDIR=SingleSource/Reoptimizer/MyNestedLoop ;;
- fib2) SUBDIR=SingleSource/Reoptimizer/Fib2 ;;
- hash) SUBDIR=SingleSource/Reoptimizer/Hash ;;
- towers) SUBDIR=SingleSource/Reoptimizer/Towers ;;
- treesort) SUBDIR=SingleSource/Reoptimizer/Treesort ;;
- intmm) SUBDIR=SingleSource/Reoptimizer/Intmm ;;
- realmm) SUBDIR=SingleSource/Reoptimizer/Realmm ;;
-
mcf) SUBDIR=External/SPEC/CINT2000/181.mcf; spectest=1 ;;
art) SUBDIR=External/SPEC/CFP2000/179.art; spectest=1;;
equake) SUBDIR=External/SPEC/CFP2000/183.equake; spectest=1 ;;
gzip) SUBDIR=External/SPEC/CINT2000/164.gzip; spectest=1 ;;
bzip2) SUBDIR=External/SPEC/CINT2000/256.bzip2; spectest=1 ;;
- *) die "Error: Unknown benchmark $arg" ;;
+ *) ucname=`echo $benchmk | perl -pe '$_ = ucfirst lc $_;'`
+ SUBDIR=$EXTRATESTSUBDIR/$ucname
+ if [ ! -d $objroot/test/Programs/$SUBDIR ]
+ then
+ die "Error: Unknown benchmark $benchmk"
+ fi
+ ;;
esac
echo "Starting ${action} on $benchmk"
-
-# get full path to test/Programs subdirectory
-objroot=`gmake prdirs | egrep 'LLVM.*Object Root' |cut -d: -f2-`
fullsubdirpath="${objroot}/test/Programs/${SUBDIR}"
do_debug () {
@@ -106,6 +114,10 @@
}
do_test () {
+ if [ $skiptrace -ne 0 ]; then
+ LLVM_REOPT="--skip-trace=$skiptrace $LLVM_REOPT"
+ export LLVM_REOPT
+ fi
if [ "$benchmk" = "olden" ]; then
exec gmake SUBDIR=$SUBDIR LARGE_PROBLEM_SIZE=1
elif [ $spectest -eq 1 ]; then
More information about the llvm-commits
mailing list