crosvm/e2e_tests/guest_under_test/use_local_build.sh
Vikram Auradkar 6e46da68ba e2e_tests: stay in the current directory
BUG=NONE
TEST=`source e2e_tests/guest_under_test/use_local_build.sh`

Change-Id: Ife81553ba2bdc2b37e079191c3d13d86d08c5136
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4072946
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-12-02 00:16:50 +00:00

21 lines
749 B
Bash
Executable file

#!/bin/bash
# Copyright 2020 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Exports env variables to make the e2e_tests use a locally built
# kernel / rootfs.
#
# Note: `source` this file, do not run it if you want it to set the environmens
# variables for you.
ARCH=$(arch)
CARGO_TARGET=$(cargo metadata --no-deps --format-version 1 |
jq -r ".target_directory")
LOCAL_BZIMAGE=${CARGO_TARGET}/guest_under_test/${ARCH}/bzImage
LOCAL_ROOTFS=${CARGO_TARGET}/guest_under_test/${ARCH}/rootfs
(cd "${0%/*}" && make "${LOCAL_BZIMAGE}" "${LOCAL_ROOTFS}")
export CROSVM_CARGO_TEST_KERNEL_BINARY="${LOCAL_BZIMAGE}"
export CROSVM_CARGO_TEST_ROOTFS_IMAGE="${LOCAL_ROOTFS}"