Skip to content

Commit

Permalink
Add new htmldocck function to run-make-support
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed May 15, 2024
1 parent ac385a5 commit c87ae94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 6 additions & 0 deletions src/tools/run-make-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
10 changes: 2 additions & 8 deletions tests/run-make/rustdoc-scrape-examples-ordering/rmake.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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();
}

0 comments on commit c87ae94

Please sign in to comment.