-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[COMPILETEST-UNTANGLE 6/N] Use TestSuite
enum instead of stringly-typed test suites
#143870
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
Conversation
@@ -869,7 +867,6 @@ const COMPILETEST_DIRECTIVE_PREFIX: &str = "//@"; | |||
|
|||
fn iter_directives( | |||
mode: TestMode, | |||
_suite: &str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remark: removed as this is (at the moment) unused.
// Note that coverage tests use the same test files for multiple test modes. | ||
string_enum! { | ||
#[derive(Clone, Copy, PartialEq, Debug)] | ||
pub enum TestSuite { | ||
Assembly => "assembly", | ||
Codegen => "codegen", | ||
CodegenUnits => "codegen-units", | ||
Coverage => "coverage", | ||
CoverageRunRustdoc => "coverage-run-rustdoc", | ||
Crashes => "crashes", | ||
Debuginfo => "debuginfo", | ||
Incremental => "incremental", | ||
MirOpt => "mir-opt", | ||
Pretty => "pretty", | ||
RunMake => "run-make", | ||
Rustdoc => "rustdoc", | ||
RustdocGui => "rustdoc-gui", | ||
RustdocJs => "rustdoc-js", | ||
RustdocJsStd=> "rustdoc-js-std", | ||
RustdocJson => "rustdoc-json", | ||
RustdocUi => "rustdoc-ui", | ||
Ui => "ui", | ||
UiFullDeps => "ui-fulldeps", | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remark: probably will want to share this definition in the future with bootstrap, but strive for compiletest-internal self-consistency first (à la #135653, but don't want to do that yet to make compiletest refactorings less annoying).
Looks simple enough, and a nice cleanup. |
r? @Kobzol |
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
342a31a
to
b19a508
Compare
Rebased. |
Thanks, you can r=me after PR CI is green. |
PR CI is 📗 |
Rollup of 8 pull requests Successful merges: - #141809 (Don't call WSACleanup on process exit) - #143710 (Updates to random number generation APIs) - #143848 (Rename `stable_mir` and `rustc_smir`) - #143855 (Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing) - #143868 (warn on align on fields to avoid breaking changes) - #143870 ([COMPILETEST-UNTANGLE 6/N] Use `TestSuite` enum instead of stringly-typed test suites) - #143901 (Region constraint nits) - #143903 (Fix typos in documentation files) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #143870 - jieyouxu:compiletest-maintenance-6, r=Kobzol [COMPILETEST-UNTANGLE 6/N] Use `TestSuite` enum instead of stringly-typed test suites This is part of a patch series to untangle `compiletest` to hopefully nudge it towards being more maintainable. This PR should contain no functional changes.
This is part of a patch series to untangle
compiletest
to hopefully nudge it towards being more maintainable.This PR should contain no functional changes.