1#!/bin/bash 2# Copyright 2020 The ChromiumOS Authors 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6# Exports env variables to make the e2e_tests use a locally built 7# kernel / rootfs. 8# 9# Note: `source` this file, do not run it if you want it to set the environmens 10# variables for you. 11 12ARCH=$(arch) 13CARGO_TARGET=$(cargo metadata --no-deps --format-version 1 | 14 jq -r ".target_directory") 15LOCAL_BZIMAGE=${CARGO_TARGET}/guest_under_test/${ARCH}/bzImage 16LOCAL_ROOTFS=${CARGO_TARGET}/guest_under_test/${ARCH}/rootfs 17 18export CROSVM_CARGO_TEST_KERNEL_BINARY="${LOCAL_BZIMAGE}" 19export CROSVM_CARGO_TEST_ROOTFS_IMAGE="${LOCAL_ROOTFS}" 20