From 8a1277de1ad3c09855122b071a1b5d38125ad980 Mon Sep 17 00:00:00 2001 From: Dennis Kempin Date: Mon, 18 Oct 2021 13:52:30 -0700 Subject: [PATCH] Kokoro: Rebase changes to ToT before testing By default Kokoro will use changes as they come from gerrit, which may have an outdated parent. We want to make sure that we are always testing against tip of tree so we are confident the presubmit test result will reflect the postsubmit results. BUG=b:202275156 TEST=Tested in Kokoro Change-Id: I2a1d2860a361eee741dc522c9859e32890ff15bf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3229947 Tested-by: kokoro Commit-Queue: Dennis Kempin Reviewed-by: Daniel Verkamp --- ci/kokoro/common.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ci/kokoro/common.sh b/ci/kokoro/common.sh index 78993f8755..07c502a7cb 100755 --- a/ci/kokoro/common.sh +++ b/ci/kokoro/common.sh @@ -30,6 +30,18 @@ setup_source() { echo "Fetching Submodules..." git submodule update --init + + echo "Rebasing changes to ToT" + # We cannot use the original origin that kokoro used, as we no longer have + # access the GoB host via rpc://. + git remote remove origin + git remote add origin https://chromium.googlesource.com/chromiumos/platform/crosvm + git fetch -q origin + + # For some mysterious reason symlinks show up as modified, which prevents + # us from rebasing the changes. + git checkout -f + git rebase origin/main } cleanup() {