Commit e61449e3 authored by Jakob Unterwurzacher's avatar Jakob Unterwurzacher Committed by Han-Wen Nienhuys

Travis CI: add second layer of timeout killing

The tests sometimes hang in a way that "go test -timeout"
does not work anymore.

Example: https://travis-ci.org/hanwen/go-fuse/jobs/609260654

Use the external "timeout" command as backup, triggering
1 minute later.

Also, the test that seems to hang is "fs", run it alone
first in the hope of getting more info.

Add "set -e" so executing stops if the first step fails
( https://github.com/travis-ci/travis-ci/issues/1066 )

Also add "-failfast" to "go test" so the failures are
not buried in later output.

All failure modes are easier to analyze now in my opinion,
as you just have to scroll to the bottom to see what is
going on.

Examples:
* https://travis-ci.com/rfjakob/go-fuse/jobs/254766675
  TestStatFs failure due to non-deterministic test, stopped by -failfast)
* https://travis-ci.com/rfjakob/go-fuse/jobs/254766676
  Hang in TestParallelDiropsHang, stopped by -timeout, backtrace available
* https://travis-ci.com/rfjakob/go-fuse/jobs/254766677
  Hang somewhere in "go test ./...", killed by "timeout -k 10".
  No backtrace, unfortunately, but at least it took 6 minutes
  instead of 10.

Change-Id: I8069d22863c178b5c9c4d0c40f13dccfdfd0873d
parent 7090b027
...@@ -26,7 +26,13 @@ install: ...@@ -26,7 +26,13 @@ install:
- go get -t -race ./... - go get -t -race ./...
# Travis CI has a no-output-timeout of 10 minutes. # Travis CI has a no-output-timeout of 10 minutes.
# Set a lower test timeout so we get proper backtraces # Set "go test -timeout" lower so we get proper backtraces
# on a hung test. # on a hung test.
# The tests sometimes hang in a way that "go test -timeout"
# does not work anymore. Use the external "timeout" command
# as backup, triggering 1 minute later.
script: script:
- go test -timeout 5m -v ./... - set -e # fail fast
- timeout -s QUIT -k 10s 90s go test -failfast -timeout 1m -v ./fs
- timeout -s QUIT -k 10s 6m go test -failfast -timeout 5m -v ./...
- set +e # restore
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