-
Notifications
You must be signed in to change notification settings - Fork 565
[tests] Make the Mono.Android_TestsMultiDex run #2715
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] Make the Mono.Android_TestsMultiDex run #2715
Conversation
|
This is to test for now, that it works on Jenkins. I want to make sure, the mentioned error will fail the build, unlike the current situations, where the build is green, even when the test didn't run and the That will be addressed in another PR. |
|
Good $DEITY, how long has multidex been broken? |
|
Hard to tell without the test running for long time ... :-) @dellis1972 do you have an idea, what might be breaking these tests? |
|
The MultiDex test is missing some additions that this commit introduced f356220. namely These are not in the same folder, so we will need to add the correct pathing and Logical Names to get that to share the |
|
@radekdoulik can you rebase this on master. |
We see these errors in our jenkins builds:
/Users/builder/jenkins/workspace/xamarin-android-pr-builder-release/xamarin-android/build-tools/scripts/TestApks.targets(217,5): error : Input file 'logcat-Release-Aot-Mono.Android_TestsMultiDex.txt' doesn't exist. [/Users/builder/jenkins/workspace/xamarin-android-pr-builder-release/xamarin-android/tests/RunApkTests.targets]
Build continuing because "ContinueOnError" on the task "ProcessLogcatTiming" is set to "ErrorAndContinue".
Turns out, that the reason for that is, that the
`Mono.Android_TestsMultiDex` test is not run, because no
`RunInstrumentationTests` nor `RunUITests` is used as their condition
clauses are resolved as **false**.
This is fixed by adding `TestApkInstrumentation` (and
`TestApkPermission` plus `TestApkPermission`) item groups. This makes
the test run thru the `RunInstrumentationTests` task.
2fcbef1 to
24100b2
Compare
It is usually hard to notice the problem, when logcat processing fails because of the logcat file missing. Thus it will make it easier to find, when we create `TestResults` file with an error, similar to `RenameTestCases` task. Also added a conditional `Error` task after `RunInstrumentationTests` and `RunUITests` tasks, to catch insufficiently specified tests. Context: dotnet#2715
It is usually hard to notice the problem, when logcat processing fails because of the logcat file missing. Thus it will make it easier to find, when we create `TestResults` file with an error, similar to `RenameTestCases` task. Also added a conditional `Error` task after `RunInstrumentationTests` and `RunUITests` tasks, to catch insufficiently specified tests. Context: dotnet#2715
Errors from `<ProcessLogcatTiming/>` were being ignored. Consider [master build #1518][0]: the build is green, which *should* mean that everything built, all tests *ran*, and all tests *pass*. However, the build log contains -- and has contained for quite some time! -- an error message: build-tools/scripts/TestApks.targets(217,5): error : Input file 'logcat-Release-Aot-Mono.Android_TestsMultiDex.txt' doesn't exist. This has also been mentioned in commit 13a6925, and this error was added in commit 5eae6e5 so that we wouldn't miss these errors. Unfortunately, we've *still* been "missing"/overlooking these errors, in large part because these errors aren't surfaced. Update `<ProcessLogcatTiming/>` to follow `<RenameTestCases/>` and generate an NUnit XML file containing an error message, which Jenkins can then display alongside any other unit test errors; see also commits 0ec00e1, 1db436c, and c38c58e. This way, when `<ProcessLogcatTiming/>` fails, the failure will be visible, which in turn will help us to fix the failure. We can't fix what we don't know about. Related: PR #2715 will fix the reported error about `logcat-Release-Aot-Mono.Android_TestsMultiDex.txt` not existing. We didn't want to merge PR #2715 until improving `<ProcessLogcatTiming/>` (this commit), for verification purposes. [0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/1518
|
build |
We see these errors in our jenkins builds:
Turns out, that the reason for that is, that the
Mono.Android_TestsMultiDextest is not run, because noRunInstrumentationTestsnorRunUITestsis used as their conditionclauses are resolved as false.
This is fixed by adding
TestApkInstrumentation(andTestApkPermissionplusTestApkPermission) item groups. This makesthe test run thru the
RunInstrumentationTeststask.