crosvm/ci/kokoro/simulate
Dennis Kempin 42b825f740 Switch to submodules based workflow
Instead of requiring crosvm to be checked out via the chromeos manifest
to access dependencies in the ChromeOS monorepo, this change adds
git submodules to third_party/.

The CI scripts and Cargo.toml are updated to use the new paths.

BUG=b:194336213
TEST=git clone --recursive https://chromium.googlesource.com/chromiumos/platform/crosvm
     cd crosvm
     cargo test
     ./test_all
     ./ci/kokoro/simulate_all

Change-Id: I9859d18176e21909ac3a140976fbd67cc14129bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3049003
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
2021-08-05 18:32:32 +00:00

33 lines
894 B
Bash
Executable file

#!/bin/bash
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Simulates a Kokoro run executing one of the build-*.sh scripts.
# e.g. ./ci/kokoro/simulate build-aarch64.sh
#
# For ease of use, just call: ./ci/kokoro/simulate_all
crosvm_src=$(realpath $(dirname $0)/../../)
kokoro_root=$(mktemp -d)
kokoro_src="${kokoro_root}/src/git/crosvm"
cleanup() {
rm -rf "${kokoro_root}"
}
main() {
echo "Copying ${crosvm_src}/ to ${kokoro_src}"
mkdir -p "${kokoro_src}"
rsync -arq --exclude "target" --exclude "__pycache__" \
"${crosvm_src}/" "${kokoro_src}"
# Run user-provided kokoro build script.
export KOKORO_ARTIFACTS_DIR="${kokoro_root}/src"
echo "Running $1 in ${kokoro_root}"
bash $(dirname $0)/$1
echo "$1 returned $?"
}
trap cleanup EXIT
main "$@"