Skip to content

Commit

Permalink
Migrate run-make/const-prop-lint to rmake.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed May 29, 2024
1 parent c0d6003 commit 5b0e6cb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 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 @@ -22,7 +22,6 @@ run-make/compiler-lookup-paths-2/Makefile
run-make/compiler-lookup-paths/Makefile
run-make/compiler-rt-works-on-mingw/Makefile
run-make/compressed-debuginfo/Makefile
run-make/const-prop-lint/Makefile
run-make/const_fn_mir/Makefile
run-make/crate-data-smoke/Makefile
run-make/crate-hash-rustc-version/Makefile
Expand Down
9 changes: 0 additions & 9 deletions tests/run-make/const-prop-lint/Makefile

This file was deleted.

18 changes: 18 additions & 0 deletions tests/run-make/const-prop-lint/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Tests that const prop lints interrupting codegen don't leave `.o` files around.

use std::fs;

use run_make_support::{rustc, tmp_dir};

fn main() {
rustc().input("input.rs").run_fail_assert_exit_code(1);

for entry in fs::read_dir(tmp_dir()).unwrap() {
let entry = entry.unwrap();
let path = entry.path();

if path.is_file() && path.extension().is_some_and(|ext| ext == "o") {
panic!("there should not be `.o` files!");
}
}
}

0 comments on commit 5b0e6cb

Please sign in to comment.