Fix ./ci/kokoro/simulate

Somehow, after rsyncing the whole directory, git will no longer work in the
copy. So instead, we are now using 'git clone'.
This changes the behavior to not include local workspace modifications in
kokoro simulations. Which is ok, we have test_all for that and the behavior
will more closely match what's happening in kokoro presubmits.

BUG=None
TEST=./ci/simulate_all

Change-Id: I439b9eadcac65d99782e2b0eb869519abb2ada37
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3152425
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
Dennis Kempin 2021-09-09 10:18:56 -07:00 committed by Commit Bot
parent 3b3545b2c3
commit e9aa5f9598

View file

@ -19,12 +19,12 @@ cleanup() {
main() {
echo "Copying ${crosvm_src}/ to ${kokoro_src}"
mkdir -p "${kokoro_src}"
rsync -arq --exclude "target" --exclude "__pycache__" \
"${crosvm_src}/" "${kokoro_src}"
git clone -q "${crosvm_src}" "${kokoro_src}"
# Run user-provided kokoro build script.
export KOKORO_ARTIFACTS_DIR="${kokoro_root}/src"
echo "Running $1 in ${kokoro_root}"
echo "Running $1 on:"
git log --max-count=1
bash $(dirname $0)/$1
echo "$1 returned $?"
}