mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Enable "dbus_api" feature build only for dbus_api tests
In this way, our integration tests exercise the same set of build features (e.g. "kvm,mshv") being used for releases. Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
@@ -231,7 +231,7 @@ fi
|
||||
|
||||
export RUST_BACKTRACE=1
|
||||
|
||||
cargo build --features "dbus_api" --all --release --target $BUILD_TARGET
|
||||
cargo build --all --release --target $BUILD_TARGET
|
||||
|
||||
# Enable KSM with some reasonable parameters so that it won't take too long
|
||||
# for the memory to be merged between two processes.
|
||||
@@ -281,4 +281,12 @@ else
|
||||
exit $RES
|
||||
fi
|
||||
|
||||
# Run tests on dbus_api
|
||||
if [ $RES -eq 0 ]; then
|
||||
cargo build --features "dbus_api" --all --release --target $BUILD_TARGET
|
||||
export RUST_BACKTRACE=1
|
||||
time cargo test "dbus_api::$test_filter" --target $BUILD_TARGET -- ${test_binary_args[*]}
|
||||
RES=$?
|
||||
fi
|
||||
|
||||
exit $RES
|
||||
|
||||
@@ -12,10 +12,10 @@ mkdir -p "$WORKLOADS_DIR"
|
||||
process_common_args "$@"
|
||||
|
||||
# For now these values are default for kvm
|
||||
test_features="--features dbus_api"
|
||||
test_features=""
|
||||
|
||||
if [ "$hypervisor" = "mshv" ] ; then
|
||||
test_features="--no-default-features ${test_features},mshv"
|
||||
test_features="--no-default-features --features mshv"
|
||||
fi
|
||||
|
||||
cp scripts/sha1sums-x86_64 $WORKLOADS_DIR
|
||||
@@ -156,7 +156,7 @@ cp $VMLINUX_IMAGE $VFIO_DIR || exit 1
|
||||
|
||||
BUILD_TARGET="$(uname -m)-unknown-linux-${CH_LIBC}"
|
||||
|
||||
cargo build --no-default-features --features "kvm,mshv,dbus_api" --all --release --target $BUILD_TARGET
|
||||
cargo build --no-default-features --features "kvm,mshv" --all --release --target $BUILD_TARGET
|
||||
|
||||
# We always copy a fresh version of our binary for our L2 guest.
|
||||
cp target/$BUILD_TARGET/release/cloud-hypervisor $VFIO_DIR
|
||||
@@ -189,4 +189,13 @@ if [ $RES -eq 0 ]; then
|
||||
RES=$?
|
||||
fi
|
||||
|
||||
# Run tests on dbus_api
|
||||
if [ $RES -eq 0 ]; then
|
||||
cargo build --no-default-features --features "kvm,mshv,dbus_api" --all --release --target $BUILD_TARGET
|
||||
export RUST_BACKTRACE=1
|
||||
# integration tests now do not reply on build feature "dbus_api"
|
||||
time cargo test $test_features "dbus_api::$test_filter" -- ${test_binary_args[*]}
|
||||
RES=$?
|
||||
fi
|
||||
|
||||
exit $RES
|
||||
|
||||
Reference in New Issue
Block a user