diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-10-23 04:31:11 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-10-23 04:31:11 +0000 |
commit | 4ccad563d2a3559f0557bfb177bcf45144219bdf (patch) | |
tree | 46bb86f514fbf6bad82da48e69a18fb09d878834 /libgo/testsuite | |
parent | 0b7463235f0e23c624d1911c9b15f531108cc5a6 (diff) | |
download | gcc-4ccad563d2a3559f0557bfb177bcf45144219bdf.zip gcc-4ccad563d2a3559f0557bfb177bcf45144219bdf.tar.gz gcc-4ccad563d2a3559f0557bfb177bcf45144219bdf.tar.bz2 |
libgo: Update to current sources.
From-SVN: r192704
Diffstat (limited to 'libgo/testsuite')
-rwxr-xr-x | libgo/testsuite/gotest | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest index 208cbaf..bbe77cc 100755 --- a/libgo/testsuite/gotest +++ b/libgo/testsuite/gotest @@ -346,6 +346,11 @@ fi # They all compile; now generate the code to call them. +testname() { + # Remove the package from the name used with the -test option. + echo $1 | sed 's/^.*\.//' +} + localname() { # The package main has been renamed to __main__ when imported. # Adjust its uses. @@ -373,7 +378,7 @@ localname() { fi # benchmarks are named BenchmarkFoo. pattern='Benchmark([^a-z].*)?' - benchmarks=$($NM -p -v _gotest_.o $xofile | egrep " $test .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | sed 's/.* //' | $symtogo) + benchmarks=$($NM -p -v _gotest_.o $xofile | egrep " $text .*\."$pattern'$' | grep -v '\..*\..*\.' | fgrep -v '$' | fgrep -v ' __go_' | sed 's/.* //' | $symtogo) # examples are named ExampleFoo pattern='Example([^a-z].*)?' @@ -396,8 +401,9 @@ localname() { echo 'var tests = []testing.InternalTest {' for i in $tests do + n=$(testname $i) j=$(localname $i) - echo ' {"'$i'", '$j'},' + echo ' {"'$n'", '$j'},' done echo '}' @@ -407,8 +413,9 @@ localname() { echo 'var benchmarks = []testing.InternalBenchmark{ //' for i in $benchmarks do + n=$(testname $i) j=$(localname $i) - echo ' {"'$i'", '$j'},' + echo ' {"'$n'", '$j'},' done echo '}' @@ -417,8 +424,9 @@ localname() { # This doesn't work because we don't pick up the output. #for i in $examples #do + # n=$(testname $i) # j=$(localname $i) - # echo ' {"'$i'", '$j', ""},' + # echo ' {"'$n'", '$j', ""},' #done echo '}' |