Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c6a29b commit 0e77f3fCopy full SHA for 0e77f3f
.kokoro/tests/run_tests.sh
@@ -22,9 +22,15 @@ shopt -s globstar
22
23
DIFF_FROM=""
24
25
-# `--only-diff-master will only run tests on project changes from the master branch.
+# `--only-diff-master will only run tests on project changes on the last common commit from the master branch.
26
if [[ $* == *--only-diff-master* ]]; then
27
- DIFF_FROM="origin/master.."
+ 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
34
fi
35
36
# `--only-diff-master will only run tests on project changes from the previous commit.
0 commit comments