hack/test: Don't exit early when all tests are filtered out
Don't exit immediately (due to `set -e` bash behavior) when grep returns with a non-zero exit code. Use empty dirs instead and let it print messages about all tests being filtered out. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
ae008570ff
commit
43956e1b71
1 changed files with 5 additions and 1 deletions
|
@ -25,7 +25,11 @@ setup_integration_test_filter() {
|
|||
fi
|
||||
|
||||
local dirs
|
||||
dirs=$(grep -rIlE --include '*_test.go' "func .*${TEST_FILTER}.*\(. \*testing\.T\)" ./integration*/ | xargs -I file dirname file | uniq)
|
||||
local files
|
||||
if files=$(grep -rIlE --include '*_test.go' "func .*${TEST_FILTER}.*\(. \*testing\.T\)" ./integration*/); then
|
||||
dirs=$(echo "$files" | xargs -I file dirname file | uniq)
|
||||
fi
|
||||
|
||||
if [ -z "${TEST_SKIP_INTEGRATION}" ]; then
|
||||
: "${TEST_INTEGRATION_DIR:=$(echo "$dirs" | grep -v '^\./integration-cli$')}"
|
||||
if [ -z "${TEST_INTEGRATION_DIR}" ]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue