From 6b9499085be274226bfc3eb2434bea4e0e90096d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 11 May 2021 21:14:40 +0200 Subject: [PATCH] Make rustdoc-gui test suite able to run with different sub directories --- src/bootstrap/test.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index de5eb7a2800e..0e9c561c6899 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -832,7 +832,7 @@ impl Step for RustdocGUI { let _ = fs::remove_dir_all(&out_dir); // We generate docs for the libraries present in the rustdoc-gui's src folder. - let libs_dir = Path::new("src/test/rustdoc-gui/src"); + let libs_dir = builder.build.src.join("src/test/rustdoc-gui/src"); for entry in libs_dir.read_dir().expect("read_dir call failed") { let entry = entry.expect("invalid entry"); let path = entry.path(); @@ -846,11 +846,11 @@ impl Step for RustdocGUI { // We now run GUI tests. let mut command = Command::new(&nodejs); command - .arg("src/tools/rustdoc-gui/tester.js") + .arg(builder.build.src.join("src/tools/rustdoc-gui/tester.js")) .arg("--doc-folder") .arg(out_dir) .arg("--tests-folder") - .arg("src/test/rustdoc-gui"); + .arg(builder.build.src.join("src/test/rustdoc-gui")); builder.run(&mut command); } else { builder.info("No nodejs found, skipping \"src/test/rustdoc-gui\" tests");