Skip to content

Commit a01c22c

Browse files
committed
Try to fix test error on Windows
1 parent 841d2ec commit a01c22c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

example-kernels/tester/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ fn main() {
44
let out_dir = env::var("OUT_DIR").unwrap();
55
let dest_path = Path::new(&out_dir).join("generated_tests.rs");
66
let mut tests = File::create(&dest_path).unwrap();
7-
for entry in Path::new("tests/integration_tests").read_dir().expect("failed to read tests/integration tests") {
7+
for entry in Path::new("tests").join("integration_tests").read_dir().expect("failed to read tests/integration tests") {
88
let entry = entry.expect("failed to read dir entry");
99
assert!(entry.file_type().unwrap().is_file());
1010
let test_path = entry.path();

example-kernels/tester/tests/integration_tests.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
use std::path::Path;
2+
13
include!(env!("GENERATED_TESTS"));
24

35
fn run_test(test_path: &str) {
46
let mut cmd = std::process::Command::new("bootimage");
57
cmd.arg("tester");
6-
cmd.arg(test_path);
8+
cmd.arg(Path::new(test_path));
79
cmd.arg("--target");
810
cmd.arg("../x86_64-bootimage-example-kernels.json");
911
let output = cmd.output().expect("failed to run bootimage");

0 commit comments

Comments
 (0)