Skip to content

Commit a5986de

Browse files
committed
Clean up testing and justfile
Signed-off-by: Ludvig Liljenberg <[email protected]>
1 parent c89f72d commit a5986de

File tree

10 files changed

+120
-90
lines changed

10 files changed

+120
-90
lines changed

Diff for: .github/workflows/dep_rust.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
run: just build-and-move-c-guests
8686

8787
- name: Build
88-
run: just build-rust ${{ matrix.config }}
88+
run: just build ${{ matrix.config }}
8989

9090
- name: Verify MSRV
9191
run: ./dev/verify-msrv.sh hyperlight-host hyperlight-guest hyperlight-common
@@ -95,10 +95,10 @@ jobs:
9595
CARGO_TERM_COLOR: always
9696
run: |
9797
# with default features
98-
just test-rust ${{ matrix.config }} ${{ matrix.hypervisor == 'mshv3' && 'mshv3' || ''}}
98+
just test ${{ matrix.config }} ${{ matrix.hypervisor == 'mshv3' && 'mshv3' || ''}}
9999
100100
# with only one driver enabled (driver mshv/kvm feature is ignored on windows) + seccomp + inprocess
101-
just test-rust ${{ matrix.config }} inprocess,seccomp,${{ matrix.hypervisor == 'mshv' && 'mshv2' || matrix.hypervisor == 'mshv3' && 'mshv3' || 'kvm' }}
101+
just test ${{ matrix.config }} inprocess,seccomp,${{ matrix.hypervisor == 'mshv' && 'mshv2' || matrix.hypervisor == 'mshv3' && 'mshv3' || 'kvm' }}
102102
103103
# make sure certain cargo features compile
104104
cargo check -p hyperlight-host --features crashdump

Diff for: Justfile

+103-80
Large diffs are not rendered by default.

Diff for: src/hyperlight_common/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ hyperlight-testing = { workspace = true }
3131

3232
[lib]
3333
bench = false # see https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options
34+
doctest = false # reduce noise in test output

Diff for: src/hyperlight_host/examples/guest-debugging/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ mod tests {
155155

156156
let mut gdb = Command::new("rust-gdb")
157157
.arg("--nw")
158+
.arg("--batch")
158159
.arg("-x")
159160
.arg(cmd_file_path)
160161
.spawn()

Diff for: src/hyperlight_host/examples/logging/main.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ fn fn_writer(_msg: String) -> Result<i32> {
3232
// by Hyperlight will also be emitted as log messages.
3333

3434
fn main() -> Result<()> {
35-
env_logger::init();
35+
env_logger::builder()
36+
.parse_filters("none,hyperlight=info")
37+
.init();
3638
// Get the path to a simple guest binary.
3739
let hyperlight_guest_path =
3840
simple_guest_as_string().expect("Cannot find the guest binary at the expected location.");

Diff for: src/hyperlight_host/examples/tracing/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ fn main() -> Result<()> {
4242
// Set up the tracing subscriber.
4343
// tracing_forest uses the tracing subscriber, which, by default, will consume logs as trace events
4444
// unless the tracing-log feature is disabled.
45-
let layer = ForestLayer::default().with_filter(EnvFilter::from_default_env());
45+
let layer = ForestLayer::default()
46+
.with_filter(EnvFilter::builder().parse("none,hyperlight=info").unwrap());
4647
Registry::default().with(layer).init();
4748
run_example()
4849
}

Diff for: src/hyperlight_host/src/mem/shared_mem.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,6 @@ mod tests {
12011201
/// test interdependencies. This test will, however, be run explicitly as a
12021202
/// part of the CI pipeline.
12031203
#[test]
1204-
#[ignore]
12051204
#[cfg(target_os = "linux")]
12061205
fn test_drop() {
12071206
use proc_maps::maps_contain_addr;

Diff for: src/hyperlight_testing/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ serde_json = "1.0"
1515

1616
[lib]
1717
bench = false # see https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options
18+
# reduce noise in test output
19+
test = false
20+
doctest = false

Diff for: src/tests/rust_guests/callbackguest/Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/tests/rust_guests/simpleguest/Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)