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:
Bo Chen
2023-06-06 12:36:36 -07:00
committed by Rob Bradford
parent 6c630f4908
commit 1faaa2cd0a
3 changed files with 387 additions and 366 deletions

View File

@@ -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