]> Cypherpunks repositories - gostls13.git/commitdiff
compress/gzip: skip TestGZIPFilesHaveZeroMTimes on non-builders
authorJoe Tsai <joetsai@digital-static.net>
Wed, 11 Jan 2017 07:13:45 +0000 (23:13 -0800)
committerJoe Tsai <thebrokentoaster@gmail.com>
Wed, 11 Jan 2017 17:48:09 +0000 (17:48 +0000)
Fixes #18604

Change-Id: I89221d5e632042167dfced068e1dc14e932cd618
Reviewed-on: https://go-review.googlesource.com/35111
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/compress/gzip/issue14937_test.go

index e76d47cc4ee5700d9faedfeb8b94a3c7370ac3ae..30c1390dfd7faf0ca4d2e1e37c8868db2f9e2089 100644 (file)
@@ -9,11 +9,17 @@ import (
        "testing"
 )
 
-// Per golang.org/issue/14937, check that every .gz file
-// in the tree has a zero mtime.
+// TestGZIPFilesHaveZeroMTimes checks that every .gz file in the tree
+// has a zero MTIME. This is a requirement for the Debian maintainers
+// to be able to have deterministic packages.
+//
+// See https://golang.org/issue/14937.
 func TestGZIPFilesHaveZeroMTimes(t *testing.T) {
-       if testing.Short() && testenv.Builder() == "" {
-               t.Skip("skipping in short mode")
+       // To avoid spurious false positives due to untracked GZIP files that
+       // may be in the user's GOROOT (Issue 18604), we only run this test on
+       // the builders, which should have a clean checkout of the tree.
+       if testenv.Builder() == "" {
+               t.Skip("skipping test on non-builder")
        }
        goroot, err := filepath.EvalSymlinks(runtime.GOROOT())
        if err != nil {