summaryrefslogtreecommitdiff
path: root/test/bench
diff options
context:
space:
mode:
authorJan Ziak <0xe2.0x9a.0x9b@gmail.com>2012-06-24 19:23:09 -0400
committerJan Ziak <0xe2.0x9a.0x9b@gmail.com>2012-06-24 19:23:09 -0400
commit48f67a25900f5da3ac4e833b4046f15c20e0926d (patch)
tree212387e6b54c4177f6fa6c161c0cca3119ac2c76 /test/bench
parent59ea698b34438e5359d646a41264f2e90f4f789e (diff)
downloadgo-48f67a25900f5da3ac4e833b4046f15c20e0926d.tar.gz
test/bench/shootout: remove dependency on C libraries in test mode
Fixes issue 3732. R=golang-dev CC=golang-dev http://codereview.appspot.com/6335053 Committer: Russ Cox <rsc@golang.org>
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 8758549bd..47707e743 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