• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Copyright 2020 The Chromium OS Authors. All rights reserved.
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 integration_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
12CARGO_TARGET=$(cargo metadata --no-deps --format-version 1 |
13    jq -r ".target_directory")
14LOCAL_BZIMAGE=${CARGO_TARGET}/guest_under_test/bzImage
15LOCAL_ROOTFS=${CARGO_TARGET}/guest_under_test/rootfs
16
17cd "${0%/*}" && make "${LOCAL_BZIMAGE}" "${LOCAL_ROOTFS}"
18
19export CROSVM_CARGO_TEST_KERNEL_BINARY="${LOCAL_BZIMAGE}"
20export CROSVM_CARGO_TEST_ROOTFS_IMAGE="${LOCAL_ROOTFS}"
21