[tests] Report errors last in RunApkTests
(Take 2!)
#1610
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: https://jenkins.mono-project.com/job/xamarin-android-pr-builder/2963/testReport/
A build for PR #1489 ran 1110 tests; it should have run over 35,000.
Where are the missing tests?
What's missing are the
.apk
on-device tests; BCL tests make upmost of our expected test count.
Analysis of the build log shows that the on-device tests are
running, with test results being downloaded:
but those results don't appear on the
testReport
URL.The problem is that the
RenameApkTestCases
target is never beingexecuted, and the
RenameApkTestCases
is responsible for copying theTestResult*
files where Jenkins looks for them:The
RenameApkTestCases
target executes afterReleaseAndroidTarget
, but becauseReleaseAndroidTarget
failed, theRenameApkTestCases
target isn't executed.Meanwhile,
ReleaseAndroidTarget
reports an error to ensure thaterrors aren't overlooked; see commit 3b893cd.
Allow the
RenameApkTestCases
target to execute by adding a newReportComponentFailures
target. TheReleaseAndroidTarget
will nolonger report errors, allowing the
RenameApkTestCases
target toexecute, while if any tests do fail, the
ReportComponentFailures
target will generate an appropriate error.
Furthermore, update all the
<MSBuild/>
invocations withinRunTests.targets
and addContinueOnError="ErrorAndContinue"
to allof them, to help ensure that we run all the tests we have, even if
previous tests fail.