Skip to content

Commit

Permalink
Rollup merge of #123563 - Oneirical:version, r=jieyouxu
Browse files Browse the repository at this point in the history
Rewrite `version` test run-make as an UI test

Claiming the simple `version` test from #121876.

Reasoning: As discussed in #123297, 10 years ago, some changes to CLI flags warranted the creation of the `version` test. Since it's not actually executing the compiled binary, it has no purpose being a `run-make` test and should instead be an UI test.

This is the exact same change as it was shown on my closed PR #123297. Changes were ready, but I did a major Git mishap while trying to fix a tidy error and messed up my branch. The details of this error are explained [here](#123297 (comment)).
  • Loading branch information
matthiaskrgr committed Apr 6, 2024
2 parents 7524f5e + a9c0ffa commit 96dbde7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 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 @@ -321,7 +321,6 @@ run-make/use-suggestions-rust-2018/Makefile
run-make/used-cdylib-macos/Makefile
run-make/used/Makefile
run-make/valid-print-requests/Makefile
run-make/version/Makefile
run-make/volatile-intrinsics/Makefile
run-make/wasm-exceptions-nostd/Makefile
run-make/wasm-override-linker/Makefile
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ENTRY_LIMIT: usize = 900;
// FIXME: The following limits should be reduced eventually.

const ISSUES_ENTRY_LIMIT: usize = 1733;
const ROOT_ENTRY_LIMIT: usize = 860;
const ROOT_ENTRY_LIMIT: usize = 861;

const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
"rs", // test source files
Expand Down
6 changes: 0 additions & 6 deletions tests/run-make/version/Makefile

This file was deleted.

9 changes: 9 additions & 0 deletions tests/ui/version/version-info-flags.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Check that rustc accepts various version info flags.
//@ dont-check-compiler-stdout
//@ revisions: version verbose-version long-verbose-version
//@ check-pass
//@[version] compile-flags: -V
//@[verbose-version] compile-flags: -vV
//@[long-verbose-verison] compile-flags: --version --verbose

fn main() {}

0 comments on commit 96dbde7

Please sign in to comment.