Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Nick Craig-Wood
298cda4163 mount test: die after 60 seconds with traceback to debug #3154 2019-06-05 16:50:08 +01:00
Nick Craig-Wood
0408abc20e add -v to tests to debug #3154 2019-06-05 16:50:08 +01:00
3 changed files with 8 additions and 2 deletions

View file

@ -33,6 +33,7 @@ env:
- GOTAGS=cmount - GOTAGS=cmount
- GO111MODULE=off - GO111MODULE=off
- GITHUB_USER=ncw - GITHUB_USER=ncw
- GOTRACEBACK=all
- secure: gU8gCV9R8Kv/Gn0SmCP37edpfIbPoSvsub48GK7qxJdTU628H0KOMiZW/T0gtV5d67XJZ4eKnhJYlxwwxgSgfejO32Rh5GlYEKT/FuVoH0BD72dM1GDFLSrUiUYOdoHvf/BKIFA3dJFT4lk2ASy4Zh7SEoXHG6goBlqUpYx8hVA= - secure: gU8gCV9R8Kv/Gn0SmCP37edpfIbPoSvsub48GK7qxJdTU628H0KOMiZW/T0gtV5d67XJZ4eKnhJYlxwwxgSgfejO32Rh5GlYEKT/FuVoH0BD72dM1GDFLSrUiUYOdoHvf/BKIFA3dJFT4lk2ASy4Zh7SEoXHG6goBlqUpYx8hVA=
- secure: Uaiveq+/rvQjO03GzvQZV2J6pZfedoFuhdXrLVhhHSeP4ZBca0olw7xaqkabUyP3LkVYXMDSX8EbyeuQT1jfEe5wp5sBdfaDtuYW6heFyjiHIIIbVyBfGXon6db4ETBjOaX/Xt8uktrgNge6qFlj+kpnmpFGxf0jmDLw1zgg7tk= - secure: Uaiveq+/rvQjO03GzvQZV2J6pZfedoFuhdXrLVhhHSeP4ZBca0olw7xaqkabUyP3LkVYXMDSX8EbyeuQT1jfEe5wp5sBdfaDtuYW6heFyjiHIIIbVyBfGXon6db4ETBjOaX/Xt8uktrgNge6qFlj+kpnmpFGxf0jmDLw1zgg7tk=
addons: addons:

View file

@ -54,10 +54,10 @@ test: rclone
# Quick test # Quick test
quicktest: quicktest:
RCLONE_CONFIG="/notfound" go test $(BUILDTAGS) $(GO_FILES) RCLONE_CONFIG="/notfound" go test -v $(BUILDTAGS) $(GO_FILES)
racequicktest: racequicktest:
RCLONE_CONFIG="/notfound" go test $(BUILDTAGS) -cpu=2 -race $(GO_FILES) RCLONE_CONFIG="/notfound" go test -v $(BUILDTAGS) -cpu=2 -race $(GO_FILES)
# Do source code quality checks # Do source code quality checks
check: rclone check: rclone

View file

@ -39,6 +39,11 @@ var (
// RunTests runs all the tests against all the VFS cache modes // RunTests runs all the tests against all the VFS cache modes
func RunTests(t *testing.T, fn MountFn) { func RunTests(t *testing.T, fn MountFn) {
// Kill everything if the timer elapes
timer := time.AfterFunc(60*time.Second, func() {
panic("mount has locked up")
})
defer timer.Stop()
mountFn = fn mountFn = fn
flag.Parse() flag.Parse()
cacheModes := []vfs.CacheMode{ cacheModes := []vfs.CacheMode{