Skip to content

Commit

Permalink
Rollup merge of #70774 - GuillaumeGomez:clean-rustdoc-js-tools, r=oll…
Browse files Browse the repository at this point in the history
…ie27

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
  • Loading branch information
Dylan-DPC authored Apr 15, 2020
2 parents 3c6e193 + 426055c commit f71b55d
Show file tree
Hide file tree
Showing 5 changed files with 403 additions and 419 deletions.
8 changes: 7 additions & 1 deletion src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,14 @@ impl Step for RustdocJSStd {
if let Some(ref nodejs) = builder.config.nodejs {
let mut command = Command::new(nodejs);
command
.arg(builder.src.join("src/tools/rustdoc-js-std/tester.js"))
.arg(builder.src.join("src/tools/rustdoc-js/tester.js"))
.arg("--crate-name")
.arg("std")
.arg("--resource-suffix")
.arg(crate::channel::CFG_RELEASE_NUM)
.arg("--doc-folder")
.arg(builder.doc_out(self.target))
.arg("--test-folder")
.arg(builder.src.join("src/test/rustdoc-js-std"));
builder.ensure(crate::doc::Std { target: self.target, stage: builder.top_stage });
builder.run(&mut command);
Expand Down
8 changes: 7 additions & 1 deletion src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2810,10 +2810,16 @@ impl<'test> TestCx<'test> {
self.document(&out_dir);

let root = self.config.find_rust_src_root().unwrap();
let file_stem =
self.testpaths.file.file_stem().and_then(|f| f.to_str()).expect("no file stem");
let res = self.cmd2procres(
Command::new(&nodejs)
.arg(root.join("src/tools/rustdoc-js/tester.js"))
.arg(out_dir.parent().expect("no parent"))
.arg("--doc-folder")
.arg(out_dir)
.arg("--crate-name")
.arg(file_stem.replace("-", "_"))
.arg("--test-file")
.arg(self.testpaths.file.with_extension("js")),
);
if !res.status.success() {
Expand Down
319 changes: 0 additions & 319 deletions src/tools/rustdoc-js-common/lib.js

This file was deleted.

Loading

0 comments on commit f71b55d

Please sign in to comment.