1
0
mirror of https://github.com/go-task/task.git synced 2025-01-06 03:53:54 +02:00

Hide signals tests behind a build tag

Testing signals requires additional executables to be available in the $PATH
and can intermittently fail as well.

Add a build tag, which means these specific tests will only run when requested.

Closes #780
This commit is contained in:
Andrey Nering 2022-06-15 10:02:45 -03:00
parent 4b2b713e59
commit 0ec8cf1b53
2 changed files with 9 additions and 3 deletions

View File

@ -65,10 +65,16 @@ tasks:
test: test:
desc: Runs test suite desc: Runs test suite
deps: [install, sleepit:build] deps: [install]
cmds: cmds:
- go test {{catLines .GO_PACKAGES}} - go test {{catLines .GO_PACKAGES}}
test:signals:
desc: Runs test suite with signals tests included
deps: [install, sleepit:build]
cmds:
- go test {{catLines .GO_PACKAGES}} -tags signals
test-release: test-release:
desc: Tests release process without publishing desc: Tests release process without publishing
cmds: cmds:

View File

@ -1,5 +1,5 @@
//go:build !windows //go:build signals
// +build !windows // +build signals
// This file contains tests for signal handling on Unix. // This file contains tests for signal handling on Unix.
// Based on code from https://github.com/marco-m/timeit // Based on code from https://github.com/marco-m/timeit