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

This commit is contained in:
Guillaume Gomez 2024-05-19 14:00:12 +02:00
parent 7c735958b2
commit 2f8b98c664
7 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -2,5 +2,5 @@
mod scrape;
fn main() {
scrape::scrape();
scrape::scrape(&[]);
}

View File

@ -2,5 +2,5 @@
mod scrape;
fn main() {
scrape::scrape();
scrape::scrape(&[]);
}

View File

@ -1,5 +1,5 @@
mod scrape;
fn main() {
scrape::scrape();
scrape::scrape(&[]);
}

View File

@ -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";
@ -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);
}

View File

@ -1,6 +0,0 @@
extra_flags := --scrape-tests
deps := ex
include ../rustdoc-scrape-examples-multiple/scrape.mk
all: scrape

View File

@ -0,0 +1,6 @@
#[path = "../rustdoc-scrape-examples-remap/scrape.rs"]
mod scrape;
fn main() {
scrape::scrape(&["--scrape-tests"]);
}