From 5c580d3eabbc335c0e3a1c0bdd68fd2a9598fb17 Mon Sep 17 00:00:00 2001 From: Oneirical Date: Sun, 31 Mar 2024 15:37:25 -0400 Subject: [PATCH] rewrite version test in Rust tidy: remove version from allowed_run_make_makefiles convert version to ui test simplify: only write check-pass once bump up max ROOT_ENTRY_LIMIT bump ROOT_ENTRY_LIMIT only what is required --- src/tools/tidy/src/allowed_run_make_makefiles.txt | 1 - src/tools/tidy/src/ui_tests.rs | 2 +- tests/run-make/version/Makefile | 6 ------ tests/ui/version-flags/version-info-flags.rs | 9 +++++++++ 4 files changed, 10 insertions(+), 8 deletions(-) delete mode 100644 tests/run-make/version/Makefile create mode 100644 tests/ui/version-flags/version-info-flags.rs diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index bdee3afa6b71d..b44055b03ccd4 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -325,7 +325,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 diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index fe27964981e06..cd63fda4a62a4 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -18,7 +18,7 @@ const ENTRY_LIMIT: usize = 900; // FIXME: The following limits should be reduced eventually. const ISSUES_ENTRY_LIMIT: usize = 1750; -const ROOT_ENTRY_LIMIT: usize = 860; +const ROOT_ENTRY_LIMIT: usize = 861; const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[ "rs", // test source files diff --git a/tests/run-make/version/Makefile b/tests/run-make/version/Makefile deleted file mode 100644 index 3a130545d69d3..0000000000000 --- a/tests/run-make/version/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -include ../tools.mk - -all: - $(RUSTC) -V - $(RUSTC) -vV - $(RUSTC) --version --verbose diff --git a/tests/ui/version-flags/version-info-flags.rs b/tests/ui/version-flags/version-info-flags.rs new file mode 100644 index 0000000000000..f0c86770e77e3 --- /dev/null +++ b/tests/ui/version-flags/version-info-flags.rs @@ -0,0 +1,9 @@ +// Check that rustc accepts various version info flags. +//@ revisions: version verbose-version long-verbose-version +//@ check-pass + +//@[version] compile-flags: -V +//@[verbose-version] compile-flags: -vV +//@[long-verbose-version] compile-flags: --version --verbose + +fn main() {}