From 0ec8cf1b53ceeb855f47f2755f7bdb1cb7be13cd Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Wed, 15 Jun 2022 10:02:45 -0300 Subject: [PATCH] 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 --- Taskfile.yml | 8 +++++++- unix_test.go => signals_test.go | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) rename unix_test.go => signals_test.go (99%) diff --git a/Taskfile.yml b/Taskfile.yml index 709cddcd..c218ff3e 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -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: diff --git a/unix_test.go b/signals_test.go similarity index 99% rename from unix_test.go rename to signals_test.go index 6c302910..479731cf 100644 --- a/unix_test.go +++ b/signals_test.go @@ -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