From 722c0465b028a437dbe63458acb8cadae5f28165 Mon Sep 17 00:00:00 2001 From: Adriano Cunha <35786489+adrcunha@users.noreply.github.com> Date: Thu, 10 Jan 2019 10:56:43 -0800 Subject: [PATCH] Properly find e2e tests to run in the default runner (#375) Listing scripts to run using shell expansion fails if there are no scripts in `/test` (shell expansion won't occur, and the raw string will be interpreted as a script name). Use `find` instead, which can deal with this edge case. --- scripts/presubmit-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/presubmit-tests.sh b/scripts/presubmit-tests.sh index 6860f82ff8ae3..4ff94755807a5 100755 --- a/scripts/presubmit-tests.sh +++ b/scripts/presubmit-tests.sh @@ -205,7 +205,7 @@ function default_integration_test_runner() { local options="" local failed=0 (( EMIT_METRICS )) && options="--emit-metrics" - for e2e_test in ./test/e2e-*tests.sh; do + for e2e_test in $(find test/ -name e2e-*tests.sh); do echo "Running integration test ${e2e_test}" if ! ${e2e_test} ${options}; then failed=1