Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .kokoro/tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ shopt -s globstar

DIFF_FROM=""

# `--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.
if [[ $* == *--only-diff-master* ]]; then
DIFF_FROM="origin/master.."
git diff --quiet "origin/master..." .kokoro/tests .kokoro/docker
CHANGED=$?
if [[ "$CHANGED" -eq 0 ]]; then
DIFF_FROM="origin/master..."
else
echo "Changes to .kokoro/test or .kokoro docker detected. Running full tests."
fi
fi

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