build-chromeos.sh: Use common.sh

Re-use the existing logic to install python, setup the source and
most importantly, enable SSH debugging.

BUG=b:226975041
TEST=None

Change-Id: I0f8b0251bea163145ba1611b3b36c4bb7c8ee968
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3606979
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
Dennis Kempin 2022-04-26 18:53:41 +00:00
parent 15a4ee3200
commit 33a368ffaf

View file

@ -11,6 +11,8 @@
set -ex
source "$(dirname $0)/common.sh"
CROS_ROOT="${KOKORO_ARTIFACTS_DIR}/cros"
CROSVM_ROOT="${KOKORO_ARTIFACTS_DIR}/git/crosvm"
DEPOT_TOOLS="${KOKORO_ARTIFACTS_DIR}/depot_tools"
@ -64,13 +66,6 @@ build_and_test_crosvm() {
}
main() {
# Ensure we have at least python 3.9. Kokoro requires us to use pyenv to install the required
# version.
if ! python3 -c "$VERSION_CHECK"; then
pyenv install --verbose --skip-existing 3.9.5
pyenv global 3.9.5
fi
mkdir -p "$CROS_ROOT"
cd "$CROS_ROOT"