2020-11-10 17:34:56 +00:00
|
|
|
#!/bin/bash
|
2022-09-13 17:55:17 +00:00
|
|
|
# Copyright 2020 The ChromiumOS Authors
|
2020-11-10 17:34:56 +00:00
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
2022-11-03 21:28:42 +00:00
|
|
|
# Exports env variables to make the e2e_tests use a locally built
|
2020-11-10 17:34:56 +00:00
|
|
|
# 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}"
|