hack/test: Fix checking if integration-cli are filtered out

Previous check checked if ANY of the test directories isn't
integration-cli. This means it was true if TEST_FILTER matched multiple
tests from both integration and integration-cli suite.

Remove the grep `-v` inversion and replace it with a bash negation, so
it actually checks if there is no `integration-cli` in test dirs.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski 2023-08-08 12:57:01 +02:00
parent 63d477b20e
commit 510cac5f5b
No known key found for this signature in database
GPG key ID: B85EFCFE26DEF92A

View file

@ -37,7 +37,7 @@ setup_integration_test_filter() {
fi
if [ -z "${TEST_SKIP_INTEGRATION_CLI}" ]; then
if echo "$dirs" | grep -vq '^./integration-cli$'; then
if ! echo "$dirs" | grep -q '^./integration-cli$'; then
TEST_SKIP_INTEGRATION_CLI=1
echo "Skipping integration-cli tests since the supplied filter \"${TEST_FILTER}\" omits all integration-cli tests"
else