mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 12:35:26 +00:00
We no longer need to build dependencies from source and provide them via pkg-config, this simplifies much of our builder container setup. As debian bullseye got promoted to stable, we can now also simplify further by just using bullseye stable instead of mixing stable and testing packages. BUG=b:181359683 TEST=./test_all Change-Id: I2ce61992d5cfe6eb5dc3f0ec61920dcc5455ca40 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3141772 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Dennis Kempin <denniskempin@google.com>
46 lines
1.2 KiB
Bash
Executable file
46 lines
1.2 KiB
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.
|
|
|
|
# Clean scratch directory if requested.
|
|
if [ "$1" = "--clean" ]; then
|
|
shift
|
|
echo "Cleaning scratch directory..."
|
|
rm -rf /workspace/scratch/*
|
|
fi
|
|
|
|
if [ "$1" = "--vm" ]; then
|
|
shift
|
|
echo "Starting testing vm..."
|
|
(cd /workspace/vm && screen -Sdm vm ./start_vm)
|
|
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="\
|
|
/workspace/src/platform/crosvm/ci/vm_tools/exec_binary_in_vm"
|
|
|
|
if [[ $# -eq 0 ]]; then
|
|
test_target="Virtual Machine (See 'screen -r vm' or 'ssh vm')"
|
|
else
|
|
test_target="Virtual Machine"
|
|
fi
|
|
export CROSVM_USE_VM=1
|
|
else
|
|
test_target="User-space emulation"
|
|
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="\
|
|
qemu-${target_arch}-static \
|
|
-E LD_LIBRARY_PATH=/workspace/scratch/lib"
|
|
fi
|
|
|
|
echo ""
|
|
echo "crosvm builder is ready:"
|
|
echo " Cargo version: $(cargo --version)"
|
|
echo " Target architecture: ${CARGO_BUILD_TARGET}"
|
|
echo " Test target: ${test_target}"
|
|
echo ""
|
|
|
|
# Run user provided command or interactive shell
|
|
if [[ $# -eq 0 ]]; then
|
|
/bin/bash
|
|
else
|
|
echo "$ $@"
|
|
/bin/bash -c "$@"
|
|
fi
|