xref: /cloud-hypervisor/scripts/run_integration_tests_vfio.sh (revision 9af2968a7dc47b89bf07ea9dc5e735084efcfa3a)
1#!/bin/bash
2set -x
3
4source $HOME/.cargo/env
5source $(dirname "$0")/test-util.sh
6
7process_common_args "$@"
8# For now these values are deafult for kvm
9features_build=""
10features_test="--features integration_tests"
11
12BUILD_TARGET="$(uname -m)-unknown-linux-${CH_LIBC}"
13CFLAGS=""
14TARGET_CC=""
15if [[ "${BUILD_TARGET}" == "x86_64-unknown-linux-musl" ]]; then
16TARGET_CC="musl-gcc"
17CFLAGS="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/"
18fi
19
20cargo build --all --release $features_build --target $BUILD_TARGET
21strip target/$BUILD_TARGET/release/cloud-hypervisor
22
23export RUST_BACKTRACE=1
24
25time cargo test $features_test "tests::vfio::$test_filter" -- --test-threads=1
26RES=$?
27
28exit $RES
29