Skip to content

Commit 42ee882

Browse files
authored
Merge pull request #2327 from sergiitk/backport-1.5-xds-interop-fix-buildscript-suites
xds interop: Fix buildscripts not continuing on a failed test suite (@grpc/[email protected] backport) Apparently there's a difference between bash 3 and bash 4. OSX comes with bash 3 out-of-box, so for whoever wrote this logic it "worked on my machine". The `((` construct returns a 0 exit code if the value is non-zero. Since the value starts at 0 and we do a post-increment, it will always fail the first time. Changing it to a pre-increment fixes the problem.
2 parents aa6d089 + 7890a79 commit 42ee882

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/grpc-js-xds/scripts/xds_k8s_lb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ main() {
167167
local failed_tests=0
168168
test_suites=("baseline_test" "api_listener_test" "change_backend_service_test" "failover_test" "remove_neg_test" "round_robin_test")
169169
for test in "${test_suites[@]}"; do
170-
run_test $test || (( failed_tests++ ))
170+
run_test $test || (( ++failed_tests ))
171171
done
172172
echo "Failed test suites: ${failed_tests}"
173173
if (( failed_tests > 0 )); then

0 commit comments

Comments
 (0)