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 <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Dennis Kempin 2021-10-18 13:52:30 -07:00 committed by Commit Bot
parent 76e6fd051b
commit 8a1277de1a

View file

@ -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() {