@@ -84,7 +84,7 @@ test-like-ci config=default-target hypervisor="kvm":
8484 cargo check -p hyperlight-host --features gdb
8585
8686 @ # without any driver (should fail to compile)
87- just test-compilation-fail {{ config}}
87+ just test-compilation-no-default-features {{ config}}
8888
8989 @ # test the crashdump feature
9090 just test-rust-crashdump {{ config}}
@@ -121,10 +121,16 @@ test-seccomp target=default-target features="":
121121 cargo test --profile={{ if target == " debug" { " dev" } else { target } }} -p hyperlight-host test_violate_seccomp_filters --lib {{ if features == " " {' ' } else { " --features " + features } }} -- --ignored
122122 cargo test --profile={{ if target == " debug" { " dev" } else { target } }} -p hyperlight-host test_violate_seccomp_filters --no-default-features {{ if features =~ " mshv3" {" --features init-paging,mshv3" } else {" --features mshv2,init-paging,kvm" } }} --lib -- --ignored
123123
124- # runs tests that ensure compilation fails when it should
125- test-compilation-fail target = default-target :
126- @ # the following should fail on linux because one of kvm, mshv, or mshv3 feature must be specified, which is why the exit code is inverted with an !.
127- {{ if os () == " linux" { " ! cargo check -p hyperlight-host --no-default-features 2> /dev/null" } else { " " } }}
124+ # tests compilation with no default features on different platforms
125+ test-compilation-no-default-features target = default-target :
126+ @ # Linux should fail without a hypervisor feature (kvm, mshv, or mshv3)
127+ {{ if os () == " linux" { " ! cargo check -p hyperlight-host --no-default-features 2> /dev/null" } else { " " } }}
128+ @ # Windows should succeed even without default features
129+ {{ if os () == " windows" { " cargo check -p hyperlight-host --no-default-features" } else { " " } }}
130+ @ # Linux should succeed with a hypervisor driver but without init-paging
131+ {{ if os () == " linux" { " cargo check -p hyperlight-host --no-default-features --features kvm" } else { " " } }}
132+ {{ if os () == " linux" { " cargo check -p hyperlight-host --no-default-features --features mshv2" } else { " " } }}
133+ {{ if os () == " linux" { " cargo check -p hyperlight-host --no-default-features --features mshv3" } else { " " } }}
128134
129135# runs tests that exercise gdb debugging
130136test-rust-gdb-debugging target = default-target features = " ":
0 commit comments