Skip to content

Commit 7f89d3d

Browse files
author
Takashi Matsuo
committed
address code review
1 parent cf85fad commit 7f89d3d

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

.kokoro/tests/run_tests.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,21 @@ shopt -s globstar
2121

2222
DIFF_FROM=""
2323

24-
# We need to temporarily turn off -e for detecting changes in the test
25-
# driver.
26-
set +e
27-
2824
# `--only-diff-master` will only run tests on project changes on the
2925
# last common commit from the master branch.
3026
if [[ $* == *--only-diff-master* ]]; then
27+
set +e
3128
git diff --quiet "origin/master..." .kokoro/tests .kokoro/docker \
3229
.kokoro/trampoline_v2.sh
3330
CHANGED=$?
31+
set -e
3432
if [[ "${CHANGED}" -eq 0 ]]; then
3533
DIFF_FROM="origin/master..."
3634
else
3735
echo "Changes to test driver files detected. Running full tests."
3836
fi
3937
fi
4038

41-
# Turning on the -e again.
42-
set -e
43-
4439
# `--only-diff-head` will only run tests on project changes from the
4540
# previous commit.
4641
if [[ $* == *--only-diff-head* ]]; then

0 commit comments

Comments
 (0)