Uh oh!
There was an error while loading. Please reload this page.
[tests] Run the Java.Interop unit tests - #565
Merged
Merged
Conversation
jonpryor
commented
Apr 21, 2017
ContributorAuthor
Note: this PR will require merging a separate Java.Interop PR: then updating this PR to include a Java.Interop bump. |
jonpryorforce-pushed
the
jonp-docs-24
branch
2 times, most recently
from
April 21, 2017 02:17
9db38b0 to
67be8b9Compareatsushieno
commented
Apr 21, 2017
Contributor
build |
Bump to Java.Interop/master/8d7060d1 Bump to cecil/master/5f93431f We'd like to run the Java.Interop unit tests as part of the xamarin-android `make run-all-tests` target, for two rasons: 1. An extra layer of sanity checking, and 2. Some of the Java.Interop tests require an Android SDK. In particular, the `ParameterFixupTests.XmlDeclaration_FixedUpFromDocumentation()` test from `Xamarin.Android.Tools.Bytecode-Tests.dll` attempts to read Android documentation from `$ANDROID_SDK_PATH` to test parameter name fixups. However, Java.Interop doesn't install -- and thus can't readily require -- an Android SDK, meaning this test is never executed as part of the Java.Interop Jenkins process. That test *can* be readily executed in xamarin-android, as it *does* install an Android SDK, and thus its presence can be assumed. Add a new `make run-ji-tests` target which runs the Java.Interop unit tests, copying their test output into the same directory that the other `TestResult-*.xml` files are placed, so that Jenkins can pick them up for display. Within the `make run-ji-tests` target, export the `ANDROID_SDK_PATH` environment variable so that *all* the `Xamarin.Android.Tools.Bytecode-Tests.dll` tests can execute. Which introduces two problems: 1. The `Xamarin.Android.Tools.Bytecode-Tests.dll` tests require that `$ANDROID_SDK_PATH` contain documentation...which we're not currently installing. 2. The Java.Interop tests still fail, due to parameter name changes, as those tests were originally using API-18 docs. Result: the `ParameterFixupTest` tests fail. :-( Fix this conundrum by instaslling `docs-24_r01.zip` within `$(AndroidSdkDirectory)`, allowing the tests to execute as intended, and by updating to Java.Interop/master/8d7060d1, which updates the expected parameter name output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We'd like to run the Java.Interop unit tests as part of the
xamarin-android
make run-all-teststarget, for two rasons:In particular, the
ParameterFixupTests.XmlDeclaration_FixedUpFromDocumentation()testfrom
Xamarin.Android.Tools.Bytecode-Tests.dllattempts to readAndroid documentation from
$ANDROID_SDK_PATHto test parameter namefixups.
However, Java.Interop doesn't install -- and thus can't readily
require -- an Android SDK, meaning this test is never executed as part
of the Java.Interop Jenkins process.
That test can be readily executed in xamarin-android, as it does
install an Android SDK, and thus its presence can be assumed.
Add a new
make run-ji-teststarget which runs the Java.Interop unittests, copying their test output into the same directory that the
other
TestResult-*.xmlfiles are placed, so that Jenkins can pickthem up for display.
Within the
make run-ji-teststarget, export theANDROID_SDK_PATHenvironment variable so that all the
Xamarin.Android.Tools.Bytecode-Tests.dlltests can execute.Which introduces one problem: the
Xamarin.Android.Tools.Bytecode-Tests.dlltests require that$ANDROID_SDK_PATHcontain documentation...which we're not currentlyinstalling.
Result: the
ParameterFixupTesttests fail. :-(Fix this conundrum by instaslling
docs-24_r01.zipwithin$(AndroidSdkDirectory), allowing the tests to execute as intended.