diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-03-31 23:03:20 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-03-31 23:03:20 +0000 |
commit | de90644af805b0ec9648de4354f9d26681e076a6 (patch) | |
tree | 243d79a0e22b59f9a03224062a755bab9b908b3e /libgo/testsuite | |
parent | 300d83d9de11381aa48273d5bdacb006955aa85f (diff) | |
download | gcc-de90644af805b0ec9648de4354f9d26681e076a6.zip gcc-de90644af805b0ec9648de4354f9d26681e076a6.tar.gz gcc-de90644af805b0ec9648de4354f9d26681e076a6.tar.bz2 |
libgo: Set name of test when using DejaGNU tests.
From-SVN: r171805
Diffstat (limited to 'libgo/testsuite')
-rwxr-xr-x | libgo/testsuite/gotest | 14 | ||||
-rw-r--r-- | libgo/testsuite/libgo.testmain/testmain.exp | 8 |
2 files changed, 21 insertions, 1 deletions
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest index 517c0e9..abfaaad 100755 --- a/libgo/testsuite/gotest +++ b/libgo/testsuite/gotest @@ -33,6 +33,7 @@ keep=false prefix= dejagnu=no timeout=60 +testname="" while $loop; do case "x$1" in x--srcdir) @@ -93,6 +94,15 @@ while $loop; do timeout=`echo $1 | sed -e 's/^--timeout=//'` shift ;; + x--testname) + testname=$2 + shift + shift + ;; + x--testname=*) + testname=`echo $1 | sed -e 's/^--testname=//'` + shift + ;; x-*) loop=false ;; @@ -386,6 +396,10 @@ xyes) cd ../testsuite rm -rf _obj _test mkdir _obj _test + if test "$testname" != ""; then + GOTESTNAME="$testname" + export GOTESTNAME + fi $MAKE check RUNTESTFLAGS="$RUNTESTFLAGS GOTEST_TMPDIR=$DIR" # Useful when using make check-target-libgo cat libgo.log >> libgo-all.log diff --git a/libgo/testsuite/libgo.testmain/testmain.exp b/libgo/testsuite/libgo.testmain/testmain.exp index f201de7..0b887ac 100644 --- a/libgo/testsuite/libgo.testmain/testmain.exp +++ b/libgo/testsuite/libgo.testmain/testmain.exp @@ -57,4 +57,10 @@ if ![ string match "" $comp_output ] { set result [libgo_load "./a.exe" "-test.short" ""] set status [lindex $result 0] -$status go + +set name "go" +if [info exists env(GOTESTNAME)] { + set name "$env(GOTESTNAME)" +} + +$status $name |