Skip to content

Commit

Permalink
Rollup merge of rust-lang#125275 - GuillaumeGomez:migrate-rustdoc-scr…
Browse files Browse the repository at this point in the history
…ape-examples-test, r=jieyouxu

Migrate `run-make/rustdoc-scrape-examples-test` to new `rmake.rs`

Part of rust-lang#121876.

r? `@jieyouxu`
  • Loading branch information
GuillaumeGomez committed May 19, 2024
2 parents fcfda8b + 2f8b98c commit 7b09243
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ run-make/rustc-macro-dep-files/Makefile
run-make/rustdoc-io-error/Makefile
run-make/rustdoc-scrape-examples-macros/Makefile
run-make/rustdoc-scrape-examples-multiple/Makefile
run-make/rustdoc-scrape-examples-test/Makefile
run-make/rustdoc-scrape-examples-whitespace/Makefile
run-make/rustdoc-verify-output-files/Makefile
run-make/rustdoc-with-output-option/Makefile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
mod scrape;

fn main() {
scrape::scrape();
scrape::scrape(&[]);
}
2 changes: 1 addition & 1 deletion tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
mod scrape;

fn main() {
scrape::scrape();
scrape::scrape(&[]);
}
2 changes: 1 addition & 1 deletion tests/run-make/rustdoc-scrape-examples-remap/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod scrape;

fn main() {
scrape::scrape();
scrape::scrape(&[]);
}
3 changes: 2 additions & 1 deletion tests/run-make/rustdoc-scrape-examples-remap/scrape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use run_make_support::{htmldocck, rustc, rustdoc, source_path, tmp_dir};
use std::fs::read_dir;
use std::path::Path;

pub fn scrape() {
pub fn scrape(extra_args: &[&str]) {
let lib_dir = tmp_dir();
let out_dir = tmp_dir().join("rustdoc");
let crate_name = "foobar";
Expand All @@ -29,6 +29,7 @@ pub fn scrape() {
.arg(&out_example)
.arg("--scrape-examples-target-crate")
.arg(crate_name)
.args(extra_args)
.run();
out_deps.push(out_example);
}
Expand Down
6 changes: 0 additions & 6 deletions tests/run-make/rustdoc-scrape-examples-test/Makefile

This file was deleted.

6 changes: 6 additions & 0 deletions tests/run-make/rustdoc-scrape-examples-test/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#[path = "../rustdoc-scrape-examples-remap/scrape.rs"]
mod scrape;

fn main() {
scrape::scrape(&["--scrape-tests"]);
}

0 comments on commit 7b09243

Please sign in to comment.