Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e77f3f

Browse files
committed
Update diff-master to check .kokoro/tests and .kokoro/docker.
1 parent 5c6a29b commit 0e77f3f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.kokoro/tests/run_tests.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@ shopt -s globstar
2222

2323
DIFF_FROM=""
2424

25-
# `--only-diff-master will only run tests on project changes from the master branch.
25+
# `--only-diff-master will only run tests on project changes on the last common commit from the master branch.
2626
if [[ $* == *--only-diff-master* ]]; then
27-
DIFF_FROM="origin/master.."
27+
git diff --quiet "$DIFF_FROM" .kokoro/tests .kokoro/docker
28+
CHANGED=$?
29+
if [[ "$CHANGED" -eq 0 ]]; then
30+
DIFF_FROM="origin/master..."
31+
else
32+
echo "Changes to .kokoro/test or .kokoro docker detected. Running full tests."
33+
fi
2834
fi
2935

3036
# `--only-diff-master will only run tests on project changes from the previous commit.

0 commit comments

Comments
 (0)