Commit 641ef2a7 authored by Joe Tsai's avatar Joe Tsai Committed by Joe Tsai

compress/gzip: skip TestGZIPFilesHaveZeroMTimes on non-builders

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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 0724aa81
...@@ -9,11 +9,17 @@ import ( ...@@ -9,11 +9,17 @@ import (
"testing" "testing"
) )
// Per golang.org/issue/14937, check that every .gz file // TestGZIPFilesHaveZeroMTimes checks that every .gz file in the tree
// in the tree has a zero mtime. // 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) { func TestGZIPFilesHaveZeroMTimes(t *testing.T) {
if testing.Short() && testenv.Builder() == "" { // To avoid spurious false positives due to untracked GZIP files that
t.Skip("skipping in short mode") // 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()) goroot, err := filepath.EvalSymlinks(runtime.GOROOT())
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment