message/pipeline: fix build on Go 1.8

Fixes build failure on the dashboard for Go 1.8:
https://build.golang.org/log/ac5c9df1b367779239f82745c05ee5eb56b522f6

Change-Id: I37051590b50959a01db23bc6652469e1775fff05
Reviewed-on: https://go-review.googlesource.com/84515
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/message/pipeline/go19_test.go b/message/pipeline/go19_test.go
new file mode 100644
index 0000000..c9517c1
--- /dev/null
+++ b/message/pipeline/go19_test.go
@@ -0,0 +1,13 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build go1.9
+
+package pipeline
+
+import "testing"
+
+func init() {
+	setHelper = (*testing.T).Helper
+}
diff --git a/message/pipeline/pipeline_test.go b/message/pipeline/pipeline_test.go
index 327e90d..198d47f 100644
--- a/message/pipeline/pipeline_test.go
+++ b/message/pipeline/pipeline_test.go
@@ -22,6 +22,9 @@
 
 var genFiles = flag.Bool("gen", false, "generate output files instead of comparing")
 
+// setHelper is testing.T.Helper on Go 1.9+, overridden by go19_test.go.
+var setHelper = func(t *testing.T) {}
+
 func TestFullCycle(t *testing.T) {
 	const path = "./testdata"
 	dirs, err := ioutil.ReadDir(path)
@@ -31,7 +34,7 @@
 	for _, f := range dirs {
 		t.Run(f.Name(), func(t *testing.T) {
 			chk := func(t *testing.T, err error) {
-				t.Helper()
+				setHelper(t)
 				if err != nil {
 					t.Fatal(err)
 				}