Skip to content

Commit b3edc16

Browse files
committed
[justfile] added new convenience recipe test-like-ci
This recipe runs tests 'like' CI w/ various combinations of features and so on. Signed-off-by: danbugs <[email protected]>
1 parent f5ba6a5 commit b3edc16

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Justfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,22 @@ clean-rust:
6262

6363
# Note: most testing recipes take an optional "features" comma separated list argument. If provided, these will be passed to cargo as **THE ONLY FEATURES**, i.e. default features will be disabled.
6464

65+
# convenience recipe to run all tests with the given target and features (similar to CI)
66+
test-like-ci config=default-target hypervisor="kvm":
67+
@# with default features
68+
just test {{config}} {{ if hypervisor == "mshv3" {"mshv3"} else {""} }}
69+
70+
@# with only one driver enabled + seccomp + inprocess
71+
just test {{config}} inprocess,seccomp,{{ if hypervisor == "mshv" {"mshv2"} else if hypervisor == "mshv3" {"mshv3"} else {"kvm"} }}
72+
73+
@# make sure certain cargo features compile
74+
cargo check -p hyperlight-host --features crashdump
75+
cargo check -p hyperlight-host --features print_debug
76+
cargo check -p hyperlight-host --features gdb
77+
78+
@# without any driver (should fail to compile)
79+
just test-compilation-fail {{config}}
80+
6581
# runs all tests
6682
test target=default-target features="": (test-unit target features) (test-isolated target features) (test-integration "rust" target features) (test-integration "c" target features) (test-seccomp target features)
6783

0 commit comments

Comments
 (0)