Skip to content

Commit

Permalink
rewrite unstable-flag-required to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jul 17, 2024
1 parent 890ef11 commit 3ba62f0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 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 @@ -120,5 +120,4 @@ run-make/test-benches/Makefile
run-make/thumb-none-cortex-m/Makefile
run-make/thumb-none-qemu/Makefile
run-make/translation/Makefile
run-make/unstable-flag-required/Makefile
run-make/x86_64-fortanix-unknown-sgx-lvi/Makefile
4 changes: 2 additions & 2 deletions tests/run-make/missing-crate-dependency/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
// in a dependency chain.
// See https://github.com/rust-lang/rust/issues/12146

use run_make_support::{fs_wrapper, rust_lib_name, rustc};
use run_make_support::{rfs, rust_lib_name, rustc};

fn main() {
rustc().crate_type("rlib").input("crateA.rs").run();
rustc().crate_type("rlib").input("crateB.rs").run();
fs_wrapper::remove_file(rust_lib_name("crateA"));
rfs::remove_file(rust_lib_name("crateA"));
// Ensure that crateC fails to compile, as the crateA dependency is missing.
rustc()
.input("crateC.rs")
Expand Down
4 changes: 0 additions & 4 deletions tests/run-make/unstable-flag-required/Makefile

This file was deleted.

12 changes: 12 additions & 0 deletions tests/run-make/unstable-flag-required/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// The flag `--output-format` is unauthorized on beta and stable releases, which led
// to confusion for maintainers doing testing on nightly. Tying it to an unstable flag
// elucidates this, and this test checks that `--output-format` cannot be passed on its
// own.
// See https://github.com/rust-lang/rust/pull/82497

use run_make_support::{diff, rustdoc};

fn main() {
let out = rustdoc().output_format("json").input("x.html").run_fail().stderr_utf8();
diff().expected_file("output-format-json.stderr").actual_text("actual-json", out).run();
}

0 comments on commit 3ba62f0

Please sign in to comment.