diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-23 04:31:11 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-23 04:31:11 +0000 |
commit | fb08d0057f91d420b6f48c112264fc87dc91b532 (patch) | |
tree | 46bb86f514fbf6bad82da48e69a18fb09d878834 /libgo/testsuite | |
parent | f507227a181bb31fa87d23a082485f99f3ef9183 (diff) |
libgo: Update to current sources.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192704 138bc75d-0d04-0410-961f-82ee72b054a4
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 208cbaf8af3..bbe77cce09d 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 '}' |