Commit d00b779
authored
[ci] Automatically retry failed emulator tests. (#7997)
[Previously](#7963), we have used `retryCountOnTaskFailure` to retry some of our flaky test suites. However this is not a good solution for our MSBuild and emulator tests for 2 reasons:
- Running each suite takes 30-60 minutes, so it would take a long time to retry the entire suite.
- The suites are very flaky, and rerunning the entire suite would likely result in test(s) that were successful on the first run to fail on the second.
We need a solution that only retries the specific test(s) that failed. Unfortunately nothing like that exists, so we'll once again have to roll our own solution, and we can reuse `dotnet-test-slicer` for this.
This involves some trickery to make everything show up correctly in the AzDO UI:
- Run the initial test suite
- Run in a Powershell so we can ignore any test failures that would move the pipeline into `SucceededWithIssues` state
- Do not automatically publish the test results, as they would contain test failures
- Run `dotnet-test-slicer retry`
- This creates a new `.runsettings` file that only contains the failed tests so `dotnet test` can run only them
- It also rewrites the test results file of the initial run and removes any failed tests from so it can be published to AzDO
- Publish the successful tests from the first run to AzDO
- Run the retried tests
- This time we can use normal `dotnet`, and any test failures can be automatically reported to AzDO
Affected Test Suites:
- MSBuild Emulator Tests1 parent 475b912 commit d00b779
File tree
5 files changed
+44
-12
lines changed- build-tools/automation/yaml-templates
5 files changed
+44
-12
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
Lines changed: 41 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments