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 default for kvm 9features="" 10 11BUILD_TARGET="$(uname -m)-unknown-linux-${CH_LIBC}" 12CFLAGS="" 13TARGET_CC="" 14if [[ "${BUILD_TARGET}" == "x86_64-unknown-linux-musl" ]]; then 15TARGET_CC="musl-gcc" 16CFLAGS="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/" 17fi 18 19cargo build --all --release $features --target $BUILD_TARGET 20strip target/$BUILD_TARGET/release/cloud-hypervisor 21 22export RUST_BACKTRACE=1 23 24time cargo test $features "vfio::$test_filter" -- --test-threads=1 ${test_binary_args[*]} 25RES=$? 26 27exit $RES 28