Skip to content

Commit f71b55d

Browse files
authored
Rollup merge of #70774 - GuillaumeGomez:clean-rustdoc-js-tools, r=ollie27
End cleanup on rustdoc-js tools Fixes #70689. It removes a lot of code, which is pretty nice. :3 We now only have one entry point and a small set of options. r? @ollie27
2 parents 3c6e193 + 426055c commit f71b55d

File tree

5 files changed

+403
-419
lines changed

5 files changed

+403
-419
lines changed

src/bootstrap/test.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,14 @@ impl Step for RustdocJSStd {
627627
if let Some(ref nodejs) = builder.config.nodejs {
628628
let mut command = Command::new(nodejs);
629629
command
630-
.arg(builder.src.join("src/tools/rustdoc-js-std/tester.js"))
630+
.arg(builder.src.join("src/tools/rustdoc-js/tester.js"))
631+
.arg("--crate-name")
632+
.arg("std")
633+
.arg("--resource-suffix")
634+
.arg(crate::channel::CFG_RELEASE_NUM)
635+
.arg("--doc-folder")
631636
.arg(builder.doc_out(self.target))
637+
.arg("--test-folder")
632638
.arg(builder.src.join("src/test/rustdoc-js-std"));
633639
builder.ensure(crate::doc::Std { target: self.target, stage: builder.top_stage });
634640
builder.run(&mut command);

src/tools/compiletest/src/runtest.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -2810,10 +2810,16 @@ impl<'test> TestCx<'test> {
28102810
self.document(&out_dir);
28112811

28122812
let root = self.config.find_rust_src_root().unwrap();
2813+
let file_stem =
2814+
self.testpaths.file.file_stem().and_then(|f| f.to_str()).expect("no file stem");
28132815
let res = self.cmd2procres(
28142816
Command::new(&nodejs)
28152817
.arg(root.join("src/tools/rustdoc-js/tester.js"))
2816-
.arg(out_dir.parent().expect("no parent"))
2818+
.arg("--doc-folder")
2819+
.arg(out_dir)
2820+
.arg("--crate-name")
2821+
.arg(file_stem.replace("-", "_"))
2822+
.arg("--test-file")
28172823
.arg(self.testpaths.file.with_extension("js")),
28182824
);
28192825
if !res.status.success() {

src/tools/rustdoc-js-common/lib.js

-319
This file was deleted.

0 commit comments

Comments
 (0)