From 06a2b89fc3e93a6c381a5d9df229766f706b58d0 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 2 Jan 2019 11:55:53 +0100 Subject: prog, pkg/{csource,ifuzz,ipc,repro}: make tests deterministic on travis Don't use random seed on travis as it produces flaky coverage reports, and probably generally better for CI setting. --- pkg/ipc/ipc_test.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/ipc') diff --git a/pkg/ipc/ipc_test.go b/pkg/ipc/ipc_test.go index dba14b190..d168a2535 100644 --- a/pkg/ipc/ipc_test.go +++ b/pkg/ipc/ipc_test.go @@ -38,6 +38,9 @@ func initTest(t *testing.T) (*prog.Target, rand.Source, int, EnvFlags) { iters = 10 } seed := int64(time.Now().UnixNano()) + if os.Getenv("TRAVIS") != "" { + seed = 0 // required for deterministic coverage reports + } rs := rand.NewSource(seed) t.Logf("seed=%v", seed) target, err := prog.GetTarget(runtime.GOOS, runtime.GOARCH) -- cgit mrf-deployment