Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .kokoro/lint/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: ".kokoro/tests/run_tests_diff_master.sh"
value: ".kokoro/tests/run_tests_diff_main.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/python2.7/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: ".kokoro/tests/run_tests_diff_master.sh"
value: ".kokoro/tests/run_tests_diff_main.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/python3.10/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: ".kokoro/tests/run_tests_diff_master.sh"
value: ".kokoro/tests/run_tests_diff_main.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/python3.6/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: ".kokoro/tests/run_tests_diff_master.sh"
value: ".kokoro/tests/run_tests_diff_main.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/python3.7/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: ".kokoro/tests/run_tests_diff_master.sh"
value: ".kokoro/tests/run_tests_diff_main.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/python3.8/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: ".kokoro/tests/run_tests_diff_master.sh"
value: ".kokoro/tests/run_tests_diff_main.sh"
}
2 changes: 1 addition & 1 deletion .kokoro/python3.9/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: ".kokoro/tests/run_tests_diff_master.sh"
value: ".kokoro/tests/run_tests_diff_main.sh"
}
10 changes: 5 additions & 5 deletions .kokoro/tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ shopt -s globstar

DIFF_FROM=""

# `--only-diff-master` will only run tests on project changes on the
# last common commit from the master branch.
if [[ $* == *--only-diff-master* ]]; then
# `--only-diff-main` will only run tests on project changes on the
# last common commit from the main branch.
if [[ $* == *--only-diff-main* ]]; then
set +e
git diff --quiet "origin/master..." .kokoro/tests .kokoro/docker \
git diff --quiet "origin/main..." .kokoro/tests .kokoro/docker \
.kokoro/trampoline_v2.sh
CHANGED=$?
set -e
if [[ "${CHANGED}" -eq 0 ]]; then
DIFF_FROM="origin/master..."
DIFF_FROM="origin/main..."
else
echo "Changes to test driver files detected. Running full tests."
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
mydir="${0%/*}"
"$mydir"/run_tests.sh --only-diff-master
"$mydir"/run_tests.sh --only-diff-main
10 changes: 5 additions & 5 deletions .kokoro/tests/run_tests_orig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ shopt -s globstar

DIFF_FROM=""

# `--only-diff-master` will only run tests on project changes on the
# last common commit from the master branch.
if [[ $* == *--only-diff-master* ]]; then
# `--only-diff-main` will only run tests on project changes on the
# last common commit from the main branch.
if [[ $* == *--only-diff-main* ]]; then
set +e
git diff --quiet "origin/master..." .kokoro/tests .kokoro/docker \
git diff --quiet "origin/main..." .kokoro/tests .kokoro/docker \
.kokoro/trampoline_v2.sh
CHANGED=$?
set -e
if [[ "${CHANGED}" -eq 0 ]]; then
DIFF_FROM="origin/master..."
DIFF_FROM="origin/main..."
else
echo "Changes to test driver files detected. Running full tests."
fi
Expand Down