mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-03 20:15:45 +00:00
scripts: Remove use of "integration_tests" feature
Given integration tests don't have special annotations, all our integration test scripts do not need to carry special flags when running `cargo test`. This commit also removed the "test::" prefix for pattern-matching different set of integration tests. Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
e7a2a715e0
commit
5b05e0cdcd
@ -245,8 +245,8 @@ if [[ "$hypervisor" = "mshv" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
features_build=""
|
# For now these values are deafult for kvm
|
||||||
features_test="--features integration_tests"
|
features=""
|
||||||
|
|
||||||
# lock the workloads folder to avoid parallel updating by different containers
|
# lock the workloads folder to avoid parallel updating by different containers
|
||||||
(
|
(
|
||||||
@ -273,7 +273,7 @@ fi
|
|||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
|
|
||||||
# Test without ACPI
|
# Test without ACPI
|
||||||
cargo build --all --release $features_build --target $BUILD_TARGET
|
cargo build --all --release $features --target $BUILD_TARGET
|
||||||
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
||||||
strip target/$BUILD_TARGET/release/vhost_user_net
|
strip target/$BUILD_TARGET/release/vhost_user_net
|
||||||
strip target/$BUILD_TARGET/release/ch-remote
|
strip target/$BUILD_TARGET/release/ch-remote
|
||||||
@ -288,13 +288,13 @@ sudo bash -c "echo 1 > /sys/kernel/mm/ksm/run"
|
|||||||
echo 2048 | sudo tee /proc/sys/vm/nr_hugepages
|
echo 2048 | sudo tee /proc/sys/vm/nr_hugepages
|
||||||
|
|
||||||
# Run all direct kernel boot (Device Tree) test cases in mod `parallel`
|
# Run all direct kernel boot (Device Tree) test cases in mod `parallel`
|
||||||
time cargo test $features_test "tests::parallel::$test_filter"
|
time cargo test $features "parallel::$test_filter"
|
||||||
RES=$?
|
RES=$?
|
||||||
|
|
||||||
# Run some tests in sequence since the result could be affected by other tests
|
# Run some tests in sequence since the result could be affected by other tests
|
||||||
# running in parallel.
|
# running in parallel.
|
||||||
if [ $RES -eq 0 ]; then
|
if [ $RES -eq 0 ]; then
|
||||||
time cargo test $features_test "tests::sequential::$test_filter" -- --test-threads=1
|
time cargo test $features "sequential::$test_filter" -- --test-threads=1
|
||||||
RES=$?
|
RES=$?
|
||||||
else
|
else
|
||||||
exit $RES
|
exit $RES
|
||||||
@ -302,7 +302,7 @@ fi
|
|||||||
|
|
||||||
# Run all ACPI test cases
|
# Run all ACPI test cases
|
||||||
if [ $RES -eq 0 ]; then
|
if [ $RES -eq 0 ]; then
|
||||||
time cargo test $features_test "tests::aarch64_acpi::$test_filter"
|
time cargo test $features "aarch64_acpi::$test_filter"
|
||||||
RES=$?
|
RES=$?
|
||||||
else
|
else
|
||||||
exit $RES
|
exit $RES
|
||||||
@ -310,7 +310,7 @@ fi
|
|||||||
|
|
||||||
# Run all test cases related to live migration
|
# Run all test cases related to live migration
|
||||||
if [ $RES -eq 0 ]; then
|
if [ $RES -eq 0 ]; then
|
||||||
time cargo test $features_test "tests::live_migration::$test_filter" -- --test-threads=1
|
time cargo test $features "live_migration::$test_filter" -- --test-threads=1
|
||||||
RES=$?
|
RES=$?
|
||||||
else
|
else
|
||||||
exit $RES
|
exit $RES
|
||||||
|
@ -11,13 +11,11 @@ mkdir -p "$WORKLOADS_DIR"
|
|||||||
|
|
||||||
process_common_args "$@"
|
process_common_args "$@"
|
||||||
|
|
||||||
# For now these values are deafult for kvm
|
# For now these values are default for kvm
|
||||||
features_build=""
|
features=""
|
||||||
features_test="--features integration_tests"
|
|
||||||
|
|
||||||
if [ "$hypervisor" = "mshv" ] ; then
|
if [ "$hypervisor" = "mshv" ] ; then
|
||||||
features_build="--no-default-features --features mshv,common"
|
features="--no-default-features --features mshv,common"
|
||||||
features_test="--no-default-features --features mshv,common,integration_tests"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp scripts/sha1sums-x86_64 $WORKLOADS_DIR
|
cp scripts/sha1sums-x86_64 $WORKLOADS_DIR
|
||||||
@ -79,7 +77,7 @@ if [[ "${BUILD_TARGET}" == "x86_64-unknown-linux-musl" ]]; then
|
|||||||
CFLAGS="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/"
|
CFLAGS="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cargo build --all --release $features_build --target $BUILD_TARGET
|
cargo build --all --release $features --target $BUILD_TARGET
|
||||||
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
||||||
strip target/$BUILD_TARGET/release/vhost_user_net
|
strip target/$BUILD_TARGET/release/vhost_user_net
|
||||||
strip target/$BUILD_TARGET/release/ch-remote
|
strip target/$BUILD_TARGET/release/ch-remote
|
||||||
@ -89,7 +87,7 @@ echo 6144 | sudo tee /proc/sys/vm/nr_hugepages
|
|||||||
sudo chmod a+rwX /dev/hugepages
|
sudo chmod a+rwX /dev/hugepages
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
time cargo test $features_test "tests::live_migration::$test_filter" -- --test-threads=1
|
time cargo test $features "live_migration::$test_filter" -- --test-threads=1
|
||||||
RES=$?
|
RES=$?
|
||||||
|
|
||||||
exit $RES
|
exit $RES
|
||||||
|
@ -11,9 +11,8 @@ if [[ "$hypervisor" = "mshv" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For now these values are deafult for kvm
|
# For now these values are default for kvm
|
||||||
features_build=""
|
features=""
|
||||||
features_test="--features integration_tests"
|
|
||||||
|
|
||||||
BUILD_TARGET="$(uname -m)-unknown-linux-${CH_LIBC}"
|
BUILD_TARGET="$(uname -m)-unknown-linux-${CH_LIBC}"
|
||||||
CFLAGS=""
|
CFLAGS=""
|
||||||
@ -23,12 +22,12 @@ TARGET_CC="musl-gcc"
|
|||||||
CFLAGS="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/"
|
CFLAGS="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cargo build --all --release $features_build --target $BUILD_TARGET
|
cargo build --all --release $features --target $BUILD_TARGET
|
||||||
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
|
|
||||||
time cargo test $features_test "tests::sgx::$test_filter"
|
time cargo test $features "sgx::$test_filter"
|
||||||
RES=$?
|
RES=$?
|
||||||
|
|
||||||
exit $RES
|
exit $RES
|
||||||
|
@ -5,9 +5,8 @@ source $HOME/.cargo/env
|
|||||||
source $(dirname "$0")/test-util.sh
|
source $(dirname "$0")/test-util.sh
|
||||||
|
|
||||||
process_common_args "$@"
|
process_common_args "$@"
|
||||||
# For now these values are deafult for kvm
|
# For now these values are default for kvm
|
||||||
features_build=""
|
features=""
|
||||||
features_test="--features integration_tests"
|
|
||||||
|
|
||||||
BUILD_TARGET="$(uname -m)-unknown-linux-${CH_LIBC}"
|
BUILD_TARGET="$(uname -m)-unknown-linux-${CH_LIBC}"
|
||||||
CFLAGS=""
|
CFLAGS=""
|
||||||
@ -17,12 +16,12 @@ TARGET_CC="musl-gcc"
|
|||||||
CFLAGS="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/"
|
CFLAGS="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cargo build --all --release $features_build --target $BUILD_TARGET
|
cargo build --all --release $features --target $BUILD_TARGET
|
||||||
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
|
|
||||||
time cargo test $features_test "tests::vfio::$test_filter" -- --test-threads=1
|
time cargo test $features "vfio::$test_filter" -- --test-threads=1
|
||||||
RES=$?
|
RES=$?
|
||||||
|
|
||||||
exit $RES
|
exit $RES
|
||||||
|
@ -5,13 +5,11 @@ source $HOME/.cargo/env
|
|||||||
source $(dirname "$0")/test-util.sh
|
source $(dirname "$0")/test-util.sh
|
||||||
|
|
||||||
process_common_args "$@"
|
process_common_args "$@"
|
||||||
# For now these values are deafult for kvm
|
# For now these values are default for kvm
|
||||||
features_build=""
|
features=""
|
||||||
features_test="--features integration_tests"
|
|
||||||
|
|
||||||
if [ "$hypervisor" = "mshv" ] ; then
|
if [ "$hypervisor" = "mshv" ] ; then
|
||||||
features_build="--no-default-features --features mshv,common"
|
features="--no-default-features --features mshv,common"
|
||||||
features_test="--no-default-features --features mshv,common,integration_tests"
|
|
||||||
fi
|
fi
|
||||||
WIN_IMAGE_FILE="/root/workloads/windows-server-2019.raw"
|
WIN_IMAGE_FILE="/root/workloads/windows-server-2019.raw"
|
||||||
|
|
||||||
@ -46,14 +44,14 @@ dmsetup mknodes
|
|||||||
dmsetup create windows-snapshot-base --table "0 $img_blk_size snapshot-origin /dev/mapper/windows-base"
|
dmsetup create windows-snapshot-base --table "0 $img_blk_size snapshot-origin /dev/mapper/windows-base"
|
||||||
dmsetup mknodes
|
dmsetup mknodes
|
||||||
|
|
||||||
cargo build --all --release $features_build --target $BUILD_TARGET
|
cargo build --all --release $features --target $BUILD_TARGET
|
||||||
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
|
|
||||||
# Only run with 1 thread to avoid tests interfering with one another because
|
# Only run with 1 thread to avoid tests interfering with one another because
|
||||||
# Windows has a static IP configured
|
# Windows has a static IP configured
|
||||||
time cargo test $features_test "tests::windows::$test_filter"
|
time cargo test $features "windows::$test_filter"
|
||||||
RES=$?
|
RES=$?
|
||||||
|
|
||||||
dmsetup remove_all -f
|
dmsetup remove_all -f
|
||||||
|
@ -11,13 +11,11 @@ mkdir -p "$WORKLOADS_DIR"
|
|||||||
|
|
||||||
process_common_args "$@"
|
process_common_args "$@"
|
||||||
|
|
||||||
# For now these values are deafult for kvm
|
# For now these values are default for kvm
|
||||||
features_build=""
|
features=""
|
||||||
features_test="--features integration_tests"
|
|
||||||
|
|
||||||
if [ "$hypervisor" = "mshv" ] ; then
|
if [ "$hypervisor" = "mshv" ] ; then
|
||||||
features_build="--no-default-features --features mshv,common"
|
features="--no-default-features --features mshv,common"
|
||||||
features_test="--no-default-features --features mshv,common,integration_tests"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp scripts/sha1sums-x86_64 $WORKLOADS_DIR
|
cp scripts/sha1sums-x86_64 $WORKLOADS_DIR
|
||||||
@ -183,7 +181,7 @@ TARGET_CC="musl-gcc"
|
|||||||
CFLAGS="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/"
|
CFLAGS="-I /usr/include/x86_64-linux-musl/ -idirafter /usr/include/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cargo build --all --release $features_build --target $BUILD_TARGET
|
cargo build --all --release $features --target $BUILD_TARGET
|
||||||
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
strip target/$BUILD_TARGET/release/cloud-hypervisor
|
||||||
strip target/$BUILD_TARGET/release/vhost_user_net
|
strip target/$BUILD_TARGET/release/vhost_user_net
|
||||||
strip target/$BUILD_TARGET/release/ch-remote
|
strip target/$BUILD_TARGET/release/ch-remote
|
||||||
@ -203,14 +201,14 @@ echo 6144 | sudo tee /proc/sys/vm/nr_hugepages
|
|||||||
sudo chmod a+rwX /dev/hugepages
|
sudo chmod a+rwX /dev/hugepages
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
time cargo test $features_test "tests::parallel::$test_filter"
|
time cargo test $features "parallel::$test_filter"
|
||||||
RES=$?
|
RES=$?
|
||||||
|
|
||||||
# Run some tests in sequence since the result could be affected by other tests
|
# Run some tests in sequence since the result could be affected by other tests
|
||||||
# running in parallel.
|
# running in parallel.
|
||||||
if [ $RES -eq 0 ]; then
|
if [ $RES -eq 0 ]; then
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
time cargo test $features_test "tests::sequential::$test_filter" -- --test-threads=1
|
time cargo test $features "sequential::$test_filter" -- --test-threads=1
|
||||||
RES=$?
|
RES=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user