diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-03-15 09:37:19 +0100 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-03-15 11:16:11 +0100 |
| commit | 634a11ef4864eb3cdaefa34d320f4be4f679b542 (patch) | |
| tree | f1adc0ea5a4dd0bc5598dff78c755a87d8db5a4e /src/ci | |
| parent | 30d57576b9040a438adc2414540da3778addf34b (diff) | |
| download | rust-634a11ef4864eb3cdaefa34d320f4be4f679b542.tar.gz rust-634a11ef4864eb3cdaefa34d320f4be4f679b542.zip | |
Add bootstrap stage to test names
Diffstat (limited to 'src/ci')
| -rw-r--r-- | src/ci/citool/src/analysis.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/ci/citool/src/analysis.rs b/src/ci/citool/src/analysis.rs index 02199636fc7..566b8e603fb 100644 --- a/src/ci/citool/src/analysis.rs +++ b/src/ci/citool/src/analysis.rs @@ -225,16 +225,23 @@ fn aggregate_tests(metrics: &JsonRoot) -> TestSuiteData { // Poor man's detection of doctests based on the "(line XYZ)" suffix let is_doctest = matches!(suite.metadata, TestSuiteMetadata::CargoPackage { .. }) && test.name.contains("(line"); - let test_entry = Test { name: normalize_test_name(&test.name), is_doctest }; + let test_entry = Test { name: generate_test_name(&test.name, &suite), is_doctest }; tests.insert(test_entry, test.outcome.clone()); } } TestSuiteData { tests } } -/// Normalizes Windows-style path delimiters to Unix-style paths. -fn normalize_test_name(name: &str) -> String { - name.replace('\\', "/") +/// Normalizes Windows-style path delimiters to Unix-style paths +/// and adds suite metadata to the test name. +fn generate_test_name(name: &str, suite: &TestSuite) -> String { + let name = name.replace('\\', "/"); + let stage = match suite.metadata { + TestSuiteMetadata::CargoPackage { stage, .. } => stage, + TestSuiteMetadata::Compiletest { stage, .. } => stage, + }; + + format!("{name} (stage {stage})") } /// Prints test changes in Markdown format to stdout. |
