Skip to content
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

[tests] Report errors last in RunApkTests (Take 2!) #1610

Merged
merged 1 commit into from
May 1, 2018

Conversation

jonpryor
Copy link
Member

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 up
most of our expected test count.

Analysis of the build log shows that the on-device tests are
running, with test results being downloaded:

…/android-toolchain/sdk/platform-tools/adb -s emulator-5570  pull "/data/data/Xamarin.Android.Bcl_Tests/files/.__override__/TestResults.xUnit.xml" "…/xamarin-android/tests/../bin/TestDebug/TestResult-Xamarin.Android.Bcl_Tests.xunit.xml"
...
/data/data/Xamarin.Android.Bcl_Tests/files/.__override__/TestResults.xUnit.xml: 1 file pulled. 53.5 MB/s (3273412 bytes in 0.058s)

but those results don't appear on the testReport URL.

The problem is that the RenameApkTestCases target is never being
executed, and the RenameApkTestCases is responsible for copying the
TestResult* files where Jenkins looks for them:

Done building target "ReleaseAndroidTarget" in project "RunApkTests.targets" -- FAILED.:

The RenameApkTestCases target executes after
ReleaseAndroidTarget, but because ReleaseAndroidTarget failed, the
RenameApkTestCases target isn't executed.

Meanwhile, ReleaseAndroidTarget reports an error to ensure that
errors aren't overlooked; see commit 3b893cd.

Allow the RenameApkTestCases target to execute by adding a new
ReportComponentFailures target. The ReleaseAndroidTarget will no
longer report errors, allowing the RenameApkTestCases target to
execute, while if any tests do fail, the ReportComponentFailures
target will generate an appropriate error.

Furthermore, update all the <MSBuild/> invocations within
RunTests.targets and add ContinueOnError="ErrorAndContinue" to all
of them, to help ensure that we run all the tests we have, even if
previous tests fail.

Context: https://jenkins.mono-project.com/job/xamarin-android-pr-builder/2963/testReport/

A build for PR dotnet#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 up
*most* of our expected test count.

Analysis of the build log shows that the on-device tests *are*
running, with test results being downloaded:

	…/android-toolchain/sdk/platform-tools/adb -s emulator-5570  pull "/data/data/Xamarin.Android.Bcl_Tests/files/.__override__/TestResults.xUnit.xml" "…/xamarin-android/tests/../bin/TestDebug/TestResult-Xamarin.Android.Bcl_Tests.xunit.xml"
	...
	/data/data/Xamarin.Android.Bcl_Tests/files/.__override__/TestResults.xUnit.xml: 1 file pulled. 53.5 MB/s (3273412 bytes in 0.058s)

but those results don't appear on the `testReport` URL.

The problem is that the `RenameApkTestCases` target is never being
executed, and the `RenameApkTestCases` is responsible for copying the
`TestResult*` files where Jenkins looks for them:

	Done building target "ReleaseAndroidTarget" in project "RunApkTests.targets" -- FAILED.:

The `RenameApkTestCases` target executes *after*
`ReleaseAndroidTarget`, but because `ReleaseAndroidTarget` failed, the
`RenameApkTestCases` target isn't executed.

Meanwhile, `ReleaseAndroidTarget` reports an error to ensure that
errors aren't overlooked; see commit 3b893cd.

Allow the `RenameApkTestCases` target to execute by adding a new
`ReportComponentFailures` target. The `ReleaseAndroidTarget` will no
longer report errors, allowing the `RenameApkTestCases` target to
execute, while if any tests *do* fail, the `ReportComponentFailures`
target will generate an appropriate error.

Furthermore, update all the `<MSBuild/>` invocations within
`RunTests.targets` and add `ContinueOnError="ErrorAndContinue"` to all
of them, to help ensure that we run all the tests we have, even if
previous tests fail.
@jonpryor jonpryor added the full-mono-integration-build For PRs; run a full build (~6-10h for mono bumps), not the faster PR subset (~2h for mono bumps) label Apr 29, 2018
@jonpryor
Copy link
Member Author

build

@jonpryor jonpryor merged commit 4105f2c into dotnet:master May 1, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
full-mono-integration-build For PRs; run a full build (~6-10h for mono bumps), not the faster PR subset (~2h for mono bumps)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant