Skip to content

Commit

Permalink
Unrolled build for rust-lang#124698
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#124698 - JoverZhang:test-rustdoc-determinism, r=jieyouxu

Rewrite `rustdoc-determinism` test in Rust

Rewrite the `rustdoc-determinism` test from rust-lang#121876.

r? `@jieyouxu`
  • Loading branch information
rust-timer committed May 4, 2024
2 parents 7dd170f + 2f4861c commit 2b43de0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ run-make/rlib-format-packed-bundled-libs-3/Makefile
run-make/rlib-format-packed-bundled-libs/Makefile
run-make/rmeta-preferred/Makefile
run-make/rustc-macro-dep-files/Makefile
run-make/rustdoc-determinism/Makefile
run-make/rustdoc-error-lines/Makefile
run-make/rustdoc-io-error/Makefile
run-make/rustdoc-map-file/Makefile
Expand Down
16 changes: 0 additions & 16 deletions tests/run-make/rustdoc-determinism/Makefile

This file was deleted.

18 changes: 18 additions & 0 deletions tests/run-make/rustdoc-determinism/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
use run_make_support::{diff, rustc, rustdoc, tmp_dir};

/// Assert that the search index is generated deterministically, regardless of the
/// order that crates are documented in.
fn main() {
let dir_first = tmp_dir().join("first");
rustdoc().out_dir(&dir_first).input("foo.rs").run();
rustdoc().out_dir(&dir_first).input("bar.rs").run();

let dir_second = tmp_dir().join("second");
rustdoc().out_dir(&dir_second).input("bar.rs").run();
rustdoc().out_dir(&dir_second).input("foo.rs").run();

diff()
.expected_file(dir_first.join("search-index.js"))
.actual_file(dir_second.join("search-index.js"))
.run();
}

0 comments on commit 2b43de0

Please sign in to comment.