From 23d9c7b685a152f3d102e9f59ecd697ae70e41f5 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 21 Oct 2016 11:45:41 +0200 Subject: [PATCH] bind: skip benchmarks in short mode The bind benchmarks are implemented as Go tests, but take quite a while to run. Skip them in short mode. Change-Id: I49ede84863b047aa8307bc0ef752fc7aa21e2d65 Reviewed-on: https://go-review.googlesource.com/31637 Reviewed-by: David Crawshaw --- bind/java/seq_test.go | 3 +++ bind/objc/seq_test.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bind/java/seq_test.go b/bind/java/seq_test.go index 7a2a062..d8636a2 100644 --- a/bind/java/seq_test.go +++ b/bind/java/seq_test.go @@ -52,6 +52,9 @@ func TestJavaSeqTest(t *testing.T) { // // while running the benchmark to see the results. func TestJavaSeqBench(t *testing.T) { + if testing.Short() { + t.Skip("skipping benchmark in short mode.") + } runTest(t, []string{"golang.org/x/mobile/bind/benchmark"}, "", "SeqBench") } diff --git a/bind/objc/seq_test.go b/bind/objc/seq_test.go index 87c7314..a75ac5f 100644 --- a/bind/objc/seq_test.go +++ b/bind/objc/seq_test.go @@ -48,6 +48,9 @@ func TestObjcSeqTest(t *testing.T) { // TestObjcSeqBench runs ObjC test SeqBench.m. // This requires the xcode command lines tools. func TestObjcSeqBench(t *testing.T) { + if testing.Short() { + t.Skip("skipping benchmark in short mode.") + } runTest(t, []string{"golang.org/x/mobile/bind/benchmark"}, "xcodebench", "SeqBench.m", true) }