diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-05-15 11:46:04 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-05-15 11:46:04 +0200 |
| commit | c87ae947ebdc868825f9ba23f45ec1a4878be996 (patch) | |
| tree | 253845037c4b317f11d0d6a09aa1c28412088961 | |
| parent | ac385a5af6d9fa8399a0cec799833cd28324abf8 (diff) | |
| download | rust-c87ae947ebdc868825f9ba23f45ec1a4878be996.tar.gz rust-c87ae947ebdc868825f9ba23f45ec1a4878be996.zip | |
Add new `htmldocck` function to `run-make-support`
| -rw-r--r-- | src/tools/run-make-support/src/lib.rs | 6 | ||||
| -rw-r--r-- | tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs index cc81d23a8ff..5295388d02c 100644 --- a/src/tools/run-make-support/src/lib.rs +++ b/src/tools/run-make-support/src/lib.rs @@ -59,6 +59,12 @@ pub fn python_command() -> Command { Command::new(python_path) } +pub fn htmldocck() -> Command { + let mut python = python_command(); + python.arg(source_path().join("/src/etc/htmldocck.py")); + python +} + pub fn source_path() -> PathBuf { std::env::var("S").expect("S variable does not exist").into() } diff --git a/tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs b/tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs index edcf3406d47..08ca9ce5de8 100644 --- a/tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs +++ b/tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs @@ -1,4 +1,4 @@ -use run_make_support::{python_command, rustc, rustdoc, source_path, tmp_dir}; +use run_make_support::{htmldocck, rustc, rustdoc, source_path, tmp_dir}; use std::fs::read_dir; use std::path::Path; @@ -45,11 +45,5 @@ fn main() { } rustdoc.run(); - python_command() - .arg(source_path().join("/src/etc/htmldocck.py")) - .arg(out_dir) - .arg("src/lib.rs") - .status() - .unwrap() - .success(); + htmldocck().arg(out_dir).arg("src/lib.rs").status().unwrap().success(); } |
