@@ -82,13 +82,18 @@ test-like-ci config=default-target hypervisor="kvm":
82
82
cargo check -p hyperlight-host --features crashdump
83
83
cargo check -p hyperlight-host --features print_debug
84
84
cargo check -p hyperlight-host --features gdb
85
+ cargo check -p hyperlight-host --features trace_guest,unwind_guest,mem_profile
85
86
86
87
@ # without any driver (should fail to compile)
87
88
just test-compilation-no-default-features {{ config}}
88
89
89
90
@ # test the crashdump feature
90
91
just test-rust-crashdump {{ config}}
91
92
93
+ @ # test the tracing related features
94
+ @ # Note: This will rebuild the guests with the tracing feature enabled
95
+ just test-rust-tracing {{ config}} {{ if hypervisor == " mshv3" {" mshv3" } else {" " } }}
96
+
92
97
# runs all tests
93
98
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)
94
99
@@ -141,6 +146,20 @@ test-rust-gdb-debugging target=default-target features="":
141
146
test-rust-crashdump target = default-target features = " ":
142
147
cargo test --profile={{ if target == " debug" { " dev" } else { target } }} {{ if features == " " {' --features crashdump' } else { " --features crashdump," + features } }} -- test_crashdump
143
148
149
+ # rust test for tracing
150
+ test-rust-tracing target = default-target features = " ":
151
+ # Run tests for the tracing guest and macro
152
+ cargo test -p hyperlight-guest-tracing --profile={{ if target == " debug" { " dev" } else { target } }}
153
+ cargo test -p hyperlight-guest-tracing-macro --profile={{ if target == " debug" { " dev" } else { target } }}
154
+
155
+ # Prepare the tracing guest for testing
156
+ just build-rust-guests {{ target }} trace_guest
157
+ just move-rust-guests {{ target }}
158
+ # Run hello-world example with tracing enabled to get the trace output
159
+ # Capture the trace file path and print use it afterwards to run cargo run -p trace_dump
160
+ cargo run --profile={{ if target == " debug" { " dev" } else { target } }} --example hello-world --features {{ if features == " " {' trace_guest' } else { " trace_guest," + features } }} \
161
+ | sed -n ' s/.*Creating trace file at: \(.*\)/\1/p' \
162
+ | xargs -I {} cargo run -p trace_dump ./ {{ simpleguest_source }} / {{ target }} / simpleguest {} list_frames
144
163
145
164
################
146
165
### LINTING ####
0 commit comments