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 | |
| 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
| -rw-r--r-- | Cargo.toml | 1 | ||||
| -rw-r--r-- | src/bootstrap/test.rs | 31 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/src/Cargo.lock | 18 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/src/Cargo.toml | 6 |
4 files changed, 21 insertions, 35 deletions
diff --git a/Cargo.toml b/Cargo.toml index 4c00a7dc99e..dedfe45aca4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,6 +40,7 @@ members = [ exclude = [ "build", "compiler/rustc_codegen_cranelift", + "src/test/rustdoc-gui", # HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`. "obj", # The `x` binary is a thin wrapper that calls `x.py`, which initializes 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); diff --git a/src/test/rustdoc-gui/src/Cargo.lock b/src/test/rustdoc-gui/src/Cargo.lock deleted file mode 100644 index a72ccffc6dd..00000000000 --- a/src/test/rustdoc-gui/src/Cargo.lock +++ /dev/null @@ -1,18 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "implementors" -version = "0.1.0" - -[[package]] -name = "lib2" -version = "0.1.0" -dependencies = [ - "implementors", -] - -[[package]] -name = "test_docs" -version = "0.1.0" diff --git a/src/test/rustdoc-gui/src/Cargo.toml b/src/test/rustdoc-gui/src/Cargo.toml deleted file mode 100644 index 9c8c0c636f0..00000000000 --- a/src/test/rustdoc-gui/src/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[workspace] -members = [ - "test_docs", - "lib2", - "implementors", -] |
