aboutsummaryrefslogtreecommitdiff
path: root/test/bench
diff options
context:
space:
mode:
authorJan Ziak <0xe2.0x9a.0x9b@gmail.com>2012-06-24 19:23:09 -0400
committerRuss Cox <rsc@golang.org>2012-06-24 19:23:09 -0400
commit13802f565400a91519df86902ece3bd0a8c5aadb (patch)
tree62482bebc236e753fdea6324b32ec4ba74a8e395 /test/bench
parentf5f3c3fe093fc359045a3818d3cd04f7b40b06c2 (diff)
downloadgo-13802f565400a91519df86902ece3bd0a8c5aadb.tar.gz
go-13802f565400a91519df86902ece3bd0a8c5aadb.zip
test/bench/shootout: remove dependency on C libraries in test mode
Fixes #3732. R=golang-dev CC=golang-dev https://golang.org/cl/6335053
Diffstat (limited to 'test/bench')
-rwxr-xr-xtest/bench/shootout/timing.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/bench/shootout/timing.sh b/test/bench/shootout/timing.sh
index 8758549bde..47707e7438 100755
--- a/test/bench/shootout/timing.sh
+++ b/test/bench/shootout/timing.sh
@@ -126,7 +126,7 @@ regexdna() {
runonly gcc -O2 fasta.c
runonly a.out 100000 > x
runonly echo 'regex-dna 100000'
- run 'gcc -O2 regex-dna.c -lpcre' a.out <x
+ runonly 'gcc -O2 regex-dna.c -lpcre' a.out <x
run 'gccgo -O2 regex-dna.go' a.out <x
run 'gccgo -O2 regex-dna-parallel.go' a.out <x
run 'gc regex-dna' $O.out <x
@@ -147,7 +147,9 @@ knucleotide() {
runonly gcc -O2 fasta.c
runonly a.out 1000000 > x # should be using 25000000
runonly echo 'k-nucleotide 1000000'
- run "gcc -O2 k-nucleotide.c $(pkg-config glib-2.0 --cflags --libs)" a.out <x
+ if [ $mode = run ]; then
+ run "gcc -O2 k-nucleotide.c $(pkg-config glib-2.0 --cflags --libs)" a.out <x
+ fi
run 'gccgo -O2 k-nucleotide.go' a.out <x
run 'gccgo -O2 k-nucleotide-parallel.go' a.out <x
run 'gc k-nucleotide' $O.out <x
@@ -174,7 +176,7 @@ meteor() {
pidigits() {
runonly echo 'pidigits 10000'
- run 'gcc -O2 pidigits.c -lgmp' a.out 10000
+ runonly 'gcc -O2 pidigits.c -lgmp' a.out 10000
run 'gccgo -O2 pidigits.go' a.out -n 10000
run 'gc pidigits' $O.out -n 10000
run 'gc_B pidigits' $O.out -n 10000