Skip to content

Commit 4c29d0f

Browse files
committed
Revert "Remove shell script; fix x.py test instead"
This reverts commit 8252907.
1 parent 8252907 commit 4c29d0f

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

src/bootstrap/test.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ impl Step for RustdocJSNotStd {
708708
target: self.target,
709709
mode: "js-doc-test",
710710
suite: "rustdoc-js",
711-
path: Some("src/test/rustdoc-js"),
711+
path: None,
712712
compare_mode: None,
713713
});
714714
} else {
@@ -1088,13 +1088,6 @@ impl Step for Compiletest {
10881088
cmd.arg("--llvm-filecheck")
10891089
.arg(builder.llvm_filecheck(builder.config.build));
10901090

1091-
if mode == "js-doc-test" {
1092-
// For js-doc-test, a test will remain ignored if the JS file
1093-
// is modified but the corresponding Rust source is not.
1094-
// By passing the --ignored flag we force them to still run.
1095-
cmd.arg("--ignored");
1096-
}
1097-
10981091
if builder.config.cmd.bless() {
10991092
cmd.arg("--bless");
11001093
}

src/tools/rustdoc-js/tester.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
if [[ $# -lt 1 ]]
4+
then
5+
echo "Usage: $0 <toolchain> (e.g. x86_64-apple-darwin)"
6+
exit
7+
fi
8+
9+
for test_name in \
10+
'basic' 'exact-match' 'module-substring' \
11+
'search-short-types' 'substring'
12+
do
13+
echo "Checking '$test_name'..."
14+
build/$1/stage1/bin/rustdoc \
15+
-o src/test/rustdoc-js/$test_name \
16+
src/test/rustdoc-js/$test_name.rs
17+
node src/tools/rustdoc-js/tester.js src/test/rustdoc-js $test_name
18+
rm -rf src/test/rustdoc-js/$test_name
19+
done

0 commit comments

Comments
 (0)