1
0
mirror of https://github.com/go-task/task.git synced 2025-01-04 03:48:02 +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:
desc: Runs test suite
deps: [install, sleepit:build]
deps: [install]
cmds:
- 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:
desc: Tests release process without publishing
cmds:

View File

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