crosvm/e2e_tests/guest_under_test/use_local_build.sh
Dennis Kempin 009cb53c76 Rename integration_tests to e2e_tests
Cargo already uses the term 'integration test' for tests living
in the tests/ directory of a crate.

To prevent confusion, rename our 'integration_tests' crate to
'e2e_tests'.

BUG=None
TEST=presubmit

Change-Id: Icfa819eaed08be54ab0f36092f1ba367f3f1ce88
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4004977
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Zihan Chen <zihanchen@google.com>
2022-11-03 22:49:39 +00:00

20 lines
718 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.
CARGO_TARGET=$(cargo metadata --no-deps --format-version 1 |
jq -r ".target_directory")
LOCAL_BZIMAGE=${CARGO_TARGET}/guest_under_test/bzImage
LOCAL_ROOTFS=${CARGO_TARGET}/guest_under_test/rootfs
cd "${0%/*}" && make "${LOCAL_BZIMAGE}" "${LOCAL_ROOTFS}"
export CROSVM_CARGO_TEST_KERNEL_BINARY="${LOCAL_BZIMAGE}"
export CROSVM_CARGO_TEST_ROOTFS_IMAGE="${LOCAL_ROOTFS}"