Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 5 pull requests #125624

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c8b0e5b
The number of tests does not depend on the architecture's pointer width
tbu- May 20, 2024
90fec5a
Add `copy_dir_all` and `recursive_diff` functions to `run-make-support`
GuillaumeGomez May 25, 2024
1551fd1
Add file path in case it cannot be read in `Diff::actual_file`
GuillaumeGomez May 25, 2024
f0ab814
Add `Rustdoc::output_format`
GuillaumeGomez May 25, 2024
bdf3864
Migrate `run-make/rustdoc-verify-output-files` to `rmake.rs`
GuillaumeGomez May 25, 2024
7d24f87
MIR validation: ensure that downcast projection is followed by field …
RalfJung May 27, 2024
b3ee911
Use `rmake` for `windows-` run-make tests
ChrisDenton May 27, 2024
57e68b6
Remove Makefiles from allowed_run_make_makefiles
ChrisDenton May 27, 2024
e081170
Add linker option to run-make-support
ChrisDenton May 27, 2024
ad5dce5
Move run-make windows_subsystem tests to ui tests
ChrisDenton May 27, 2024
e5d1003
crashes: increment the number of tracked ones
matthiaskrgr May 25, 2024
894386a
remove fixed crashes, add fixed crashes to tests, add new cashed foun…
matthiaskrgr May 27, 2024
569f510
Rollup merge of #125339 - tbu-:pr_tidy_ui_tests_u32, r=clubby789
matthiaskrgr May 27, 2024
22e8279
Rollup merge of #125539 - matthiaskrgr:cräsh, r=jieyouxu
matthiaskrgr May 27, 2024
69308e9
Rollup merge of #125542 - GuillaumeGomez:migrate-rustdoc-verify-outpu…
matthiaskrgr May 27, 2024
834914c
Rollup merge of #125613 - ChrisDenton:windows-recipie, r=jieyouxu
matthiaskrgr May 27, 2024
a3d4b5f
Rollup merge of #125616 - RalfJung:mir-validate-downcast-projection, …
matthiaskrgr May 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Migrate run-make/rustdoc-verify-output-files to rmake.rs
  • Loading branch information
GuillaumeGomez committed May 27, 2024
commit bdf3864d51f7141d9e0fd14c754c7c3b5650af60
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 @@ -227,7 +227,6 @@ run-make/rlib-format-packed-bundled-libs/Makefile
run-make/rmeta-preferred/Makefile
run-make/rustc-macro-dep-files/Makefile
run-make/rustdoc-io-error/Makefile
run-make/rustdoc-verify-output-files/Makefile
run-make/sanitizer-cdylib-link/Makefile
run-make/sanitizer-dylib-link/Makefile
run-make/sanitizer-staticlib-link/Makefile
Expand Down
32 changes: 0 additions & 32 deletions tests/run-make/rustdoc-verify-output-files/Makefile

This file was deleted.

49 changes: 49 additions & 0 deletions tests/run-make/rustdoc-verify-output-files/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
use std::fs::copy;
use std::path::{Path, PathBuf};

use run_make_support::{copy_dir_all, recursive_diff, rustdoc, tmp_dir};

#[derive(PartialEq)]
enum JsonOutput {
Yes,
No,
}

fn generate_docs(out_dir: &Path, json_output: JsonOutput) {
let mut rustdoc = rustdoc();
rustdoc.input("src/lib.rs").crate_name("foobar").crate_type("lib").out_dir(&out_dir);
if json_output == JsonOutput::Yes {
rustdoc.arg("-Zunstable-options").output_format("json");
}
rustdoc.run();
}

fn main() {
let out_dir = tmp_dir().join("rustdoc");
let tmp_out_dir = tmp_dir().join("tmp-rustdoc");

// Generate HTML docs.
generate_docs(&out_dir, JsonOutput::No);

// Copy first output for to check if it's exactly same after second compilation.
copy_dir_all(&out_dir, &tmp_out_dir);

// Generate html docs once again on same output.
generate_docs(&out_dir, JsonOutput::No);

// Generate json doc on the same output.
generate_docs(&out_dir, JsonOutput::Yes);

// Check if expected json file is generated.
assert!(out_dir.join("foobar.json").is_file());

// Copy first json output to check if it's exactly same after second compilation.
copy(out_dir.join("foobar.json"), tmp_out_dir.join("foobar.json")).unwrap();

// Generate json doc on the same output.
generate_docs(&out_dir, JsonOutput::Yes);

// Check if all docs(including both json and html formats) are still the same after multiple
// compilations.
recursive_diff(&out_dir, &tmp_out_dir);
}
Loading