Skip to content

Commit

Permalink
[xharness] Handle exceptions that occur while listing device candidat…
Browse files Browse the repository at this point in the history
…es gracefully. (#12133)

This fixes a problem where the html report wouldn't be re-generated if there
was a problem loading a device (which for instance could happen if xharness
was unable to create a required simulator).
  • Loading branch information
rolfbjarne authored Jul 20, 2021
1 parent 80d2bfa commit e9c8b50
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/xharness/Jenkins/Reports/HtmlReportWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,12 @@ public void Write (IList<ITestTask> allTasks, StreamWriter writer)
candidates = (runTest as RunSimulatorTask)?.Candidates;
if (candidates != null) {
writer.WriteLine ($"Candidate devices:<br />");
foreach (var candidate in candidates)
writer.WriteLine ($"&nbsp;&nbsp;&nbsp;&nbsp;{candidate.Name} (Version: {candidate.OSVersion})<br />");
try {
foreach (var candidate in candidates)
writer.WriteLine ($"&nbsp;&nbsp;&nbsp;&nbsp;{candidate.Name} (Version: {candidate.OSVersion})<br />");
} catch (Exception e) {
writer.WriteLine ($"&nbsp;&nbsp;&nbsp;&nbsp;Failed to list candidates: {e}");
}
}
writer.WriteLine ($"Build duration: {runTest.BuildTask.Duration} <br />");
}
Expand Down

8 comments on commit e9c8b50

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

API Diff (from PR only) (no change)
Generator Diff (no change)

Packages generated

View packages

Test results

2 tests failed, 219 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst/Debug [dotnet]: Failed (Tests run: 2629 Passed: 2493 Inconclusive: 35 Failed: 1 Ignored: 135)
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations): Failed

Pipeline on Agent XAMBOT-1038.BigSur'
[xharness] Handle exceptions that occur while listing device candidates gracefully. (#12133)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Tests failed catastrophically on VSTS: device tests tvOS 🔥

Not enough free space in the host.

Pipeline on Agent
[xharness] Handle exceptions that occur while listing device candidates gracefully. (#12133)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Tests were not ran (VSTS: device tests tvOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[xharness] Handle exceptions that occur while listing device candidates gracefully. (#12133)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Tests were not ran (VSTS: device tests iOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[xharness] Handle exceptions that occur while listing device candidates gracefully. (#12133)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Tests passed on macOS Mac Catalina (10.15) ✅

Tests passed

All tests on macOS X Mac Catalina (10.15) passed.

Pipeline on Agent
[xharness] Handle exceptions that occur while listing device candidates gracefully. (#12133)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Tests passed on macOS Mac Mojave (10.14) ✅

Tests passed

All tests on macOS X Mac Mojave (10.14) passed.

Pipeline on Agent
[xharness] Handle exceptions that occur while listing device candidates gracefully. (#12133)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Tests passed on macOS Mac High Sierra (10.13) ✅

Tests passed

All tests on macOS X Mac High Sierra (10.13) passed.

Pipeline on Agent
[xharness] Handle exceptions that occur while listing device candidates gracefully. (#12133)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Tests were not ran (VSTS: device tests iOS32b). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[xharness] Handle exceptions that occur while listing device candidates gracefully. (#12133)

Please sign in to comment.