summaryrefslogtreecommitdiff
path: root/libgo/testsuite
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-25 08:02:28 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-25 08:02:28 +0000
commitf9a64dbd998f7761e6a06fc71052346d7f76c7f4 (patch)
tree3608e9a4fa99bbcc7d88dda34b1619a4ac4b122b /libgo/testsuite
parent29a742dc2ec93b766a342fa6fb65da055c5417fc (diff)
downloadgcc-f9a64dbd998f7761e6a06fc71052346d7f76c7f4.tar.gz
2012-10-25 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 192797 using svnmerge.py git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@192798 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/testsuite')
-rwxr-xr-xlibgo/testsuite/gotest16
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 '}'