diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-07-21 17:55:44 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-07-21 20:07:50 +0200 |
| commit | 3bafcf87aaaf3785873b637a67d7b49dafbb0a69 (patch) | |
| tree | 1437077f7ea5c04b421bbe22c6de614c6f3ea307 /src/bootstrap | |
| parent | 1bf8a839d32dfbc03c383319e463f3e1ab877646 (diff) | |
| download | rust-3bafcf87aaaf3785873b637a67d7b49dafbb0a69.tar.gz rust-3bafcf87aaaf3785873b637a67d7b49dafbb0a69.zip | |
Remove cargo workspace to build rustdoc-gui test crates because of cargo config not being applied
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/test.rs | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 50980d25cb2..31f18d81c7c 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -907,18 +907,27 @@ impl Step for RustdocGUI { // We remove existing folder to be sure there won't be artifacts remaining. let _ = fs::remove_dir_all(&out_dir); - let src_path = "src/test/rustdoc-gui/src"; + let src_path = builder.build.src.join("src/test/rustdoc-gui/src"); // We generate docs for the libraries present in the rustdoc-gui's src folder. - let mut cargo = Command::new(&builder.initial_cargo); - cargo - .arg("doc") - .arg("--workspace") - .arg("--target-dir") - .arg(&out_dir) - .env("RUSTDOC", builder.rustdoc(self.compiler)) - .env("RUSTC", builder.rustc(self.compiler)) - .current_dir(&builder.build.src.join(src_path)); - builder.run(&mut cargo); + for entry in src_path.read_dir().expect("read_dir call failed") { + if let Ok(entry) = entry { + let path = entry.path(); + + if !path.is_dir() { + continue; + } + + let mut cargo = Command::new(&builder.initial_cargo); + cargo + .arg("doc") + .arg("--target-dir") + .arg(&out_dir) + .env("RUSTDOC", builder.rustdoc(self.compiler)) + .env("RUSTC", builder.rustc(self.compiler)) + .current_dir(path); + builder.run(&mut cargo); + } + } // We now run GUI tests. let mut command = Command::new(&nodejs); |
