From 55543e2570f2ac2b489f181ac9e8d8b158d0f6e7 Mon Sep 17 00:00:00 2001 From: aarzilli Date: Thu, 16 Apr 2020 17:40:00 +0200 Subject: [PATCH] Makefile: reduce test timeout when TRAVIS==true Reduces test timeout by one minute so that Go will timeout before Travis-CI and report useful informations about the hang. --- _scripts/make.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_scripts/make.go b/_scripts/make.go index 2e607c21..96872f99 100644 --- a/_scripts/make.go +++ b/_scripts/make.go @@ -278,6 +278,9 @@ func testFlags() []string { } if NOTimeout { testFlags = append(testFlags, "-timeout", "0") + } else if os.Getenv("TRAVIS") == "true" { + // Make test timeout shorter than Travis' own timeout so that Go can report which test hangs. + testFlags = append(testFlags, "-timeout", "9m") } if runtime.GOOS == "darwin" { testFlags = append(testFlags, "-exec="+wd+"/_scripts/testsign")