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

Bump to Java.Interop/master/d8862d89 #1166

Merged
merged 1 commit into from
Jan 9, 2018

Conversation

jonpryor
Copy link
Member

@jonpryor jonpryor commented Jan 9, 2018

Fixes: #1149

Adds support for $(JI_MAX_JDK) (not yet used).

Fix many, many, Gendarme warnings in Java.Interop.dll.

Fixes: dotnet#1149

Adds support for `$(JI_MAX_JDK)` (not yet used).

Fix many, *many*, Gendarme warnings in `Java.Interop.dll`.
@jonpryor jonpryor merged commit 304d6f3 into dotnet:master Jan 9, 2018
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Sep 13, 2018
We've been dealing with a head-scratching annoyance: `.apk` test would
execute, pass, and have their `TestResults.xml` files extractable when
the PR builds run the `.apk` tests, but *not* when `master` does.

This makes it difficult to know whether or not we've broken anything.

One "interesting" observation we've had is that the paths *differ* on
the "downloadable" vs. "undownloadable" builds.  For example,
[master build dotnet#1166][0] uses an internal storage path:

	RunTestApks
	  ...
	  Executing: /Users/builder/android-toolchain/sdk/platform-tools/adb   shell run-as Mono.Android_Tests cat "/data/user/0/Mono.Android_Tests/files/.__override__/TestResults.xml"
	    writing stdout to file: /Users/builder/jenkins/workspace/xamarin-android/xamarin-android/tests/../bin/TestRelease/TestResult-Mono.Android_Tests.xml
	…/xamarin-android/build-tools/scripts/TestApks.targets(188,5): error :   Command /Users/builder/android-toolchain/sdk/platform-tools/adb   shell run-as Mono.Android_Tests cat "/data/user/0/Mono.Android_Tests/files/.__override__/TestResults.xml" failed with exit code 1

While the "same" command on [PR build dotnet#4003][1] uses an external path:

	RunTestApks:
	  ...
	  Executing: /Users/builder/android-toolchain/sdk/platform-tools/adb -s emulator-5570  shell run-as Mono.Android_Tests cat "/storage/emulated/0/Android/data/Mono.Android_Tests/files/Documents/TestResults.xml"
	    writing stdout to file: /Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/tests/../bin/TestDebug/TestResult-Mono.Android_Tests.xml

*Why* do these paths differ?

The paths differ -- internal storage on master, external on PR builds
-- because `Xamarin.Android.NUnitLite.dll` only uses
[external storage directories][2] when it's built against a
`$(TargetFrameworkVersion)` value >= v4.4.

This is true on PR builds, where we only build one API level,
`$(AndroidFrameworkVersion)`, currently v9.0 (API-28).

This is *not* true on master builds where we build for *all* API
levels, and "really" build `Xamarin.Android.NUnitLite.dll` for the
[*first* supported API level][3], v2.3 (API-10)!

Update the `Xamarin.Android.NUnitLite.dll` build within
`make framework-assemblies` so that instead of building for the
*first* API level, we build for the *last* API level.

This should allow our unit tests to work sanely on "full" builds.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/1166/
[1]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-pr-builder/4003/
[2]: https://github.com/xamarin/xamarin-android/blob/e153d42e51d36170487b3081c55310d978685b06/src/Xamarin.Android.NUnitLite/Gui/Instrumentations/TestSuiteInstrumentation.cs#L107-L110
[3]: https://github.com/xamarin/xamarin-android/blob/e153d42e51d36170487b3081c55310d978685b06/build-tools/scripts/BuildEverything.mk#L113-L118
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Sep 13, 2018
We've been dealing with a head-scratching annoyance: `.apk` test would
execute, pass, and have their `TestResults.xml` files extractable when
the PR builds run the `.apk` tests, but *not* when `master` does.

This makes it difficult to know whether or not we've broken anything.

One "interesting" observation we've had is that the paths *differ* on
the "downloadable" vs. "undownloadable" builds.  For example,
[master build dotnet#1166][0] uses an internal storage path:

	RunTestApks
	  ...
	  Executing: /Users/builder/android-toolchain/sdk/platform-tools/adb   shell run-as Mono.Android_Tests cat "/data/user/0/Mono.Android_Tests/files/.__override__/TestResults.xml"
	    writing stdout to file: /Users/builder/jenkins/workspace/xamarin-android/xamarin-android/tests/../bin/TestRelease/TestResult-Mono.Android_Tests.xml
	…/xamarin-android/build-tools/scripts/TestApks.targets(188,5): error :   Command /Users/builder/android-toolchain/sdk/platform-tools/adb   shell run-as Mono.Android_Tests cat "/data/user/0/Mono.Android_Tests/files/.__override__/TestResults.xml" failed with exit code 1

While the "same" command on [PR build dotnet#4003][1] uses an external path:

	RunTestApks:
	  ...
	  Executing: /Users/builder/android-toolchain/sdk/platform-tools/adb -s emulator-5570  shell run-as Mono.Android_Tests cat "/storage/emulated/0/Android/data/Mono.Android_Tests/files/Documents/TestResults.xml"
	    writing stdout to file: /Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/tests/../bin/TestDebug/TestResult-Mono.Android_Tests.xml

*Why* do these paths differ?

The paths differ -- internal storage on master, external on PR builds
-- because `Xamarin.Android.NUnitLite.dll` only uses
[external storage directories][2] when it's built against a
`$(TargetFrameworkVersion)` value >= v4.4.

This is true on PR builds, where we only build one API level,
`$(AndroidFrameworkVersion)`, currently v9.0 (API-28).

This is *not* true on master builds where we build for *all* API
levels, and "really" build `Xamarin.Android.NUnitLite.dll` for the
[*first* supported API level][3], v2.3 (API-10)!

Update the `Xamarin.Android.NUnitLite.dll` build within
`make framework-assemblies` so that instead of building for the
*first* API level, we build for the *last* API level.

This should allow our unit tests to work sanely on "full" builds.

Additionally, update/"partially revert" the
`<RunInstrumentationTests/>` task so that it *always* performs
`adb pull` to extract `TestResults.xml`, instead of using
`adb shell run-as ... cat ...`, as introduced in 2e8f96f.
The problem with `run-as ... cat` is that it doesn't work with
non-debuggable packages, e.g. if you have a
`Mono.Android_Tests-Signed.apk` built in the `Release` configuration,
`run-as` will *fail*:

	$ adb shell run-as Mono.Android_Tests cat /storage/emulated/0/Android/data/Mono.Android_Tests/files/Documents/TestResults.xml
	run-as: package not debuggable: Mono.Android_Tests

Instead of special-casing `<RunInstrumentationTests/>` to try using
`run-as` in some circumstances and `pull` in others, "revert" to
pre-2e8f96f5 behavior and always use `adb pull`.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/1166/
[1]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-pr-builder/4003/
[2]: https://github.com/xamarin/xamarin-android/blob/e153d42e51d36170487b3081c55310d978685b06/src/Xamarin.Android.NUnitLite/Gui/Instrumentations/TestSuiteInstrumentation.cs#L107-L110
[3]: https://github.com/xamarin/xamarin-android/blob/e153d42e51d36170487b3081c55310d978685b06/build-tools/scripts/BuildEverything.mk#L113-L118
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Sep 13, 2018
We've been dealing with a head-scratching annoyance: `.apk` test would
execute, pass, and have their `TestResults.xml` files extractable when
the PR builds run the `.apk` tests, but *not* when `master` does.

This makes it difficult to know whether or not we've broken anything.

One "interesting" observation we've had is that the paths *differ* on
the "downloadable" vs. "undownloadable" builds.  For example,
[master build dotnet#1166][0] uses an internal storage path:

	RunTestApks
	  ...
	  Executing: /Users/builder/android-toolchain/sdk/platform-tools/adb   shell run-as Mono.Android_Tests cat "/data/user/0/Mono.Android_Tests/files/.__override__/TestResults.xml"
	    writing stdout to file: /Users/builder/jenkins/workspace/xamarin-android/xamarin-android/tests/../bin/TestRelease/TestResult-Mono.Android_Tests.xml
	…/xamarin-android/build-tools/scripts/TestApks.targets(188,5): error :   Command /Users/builder/android-toolchain/sdk/platform-tools/adb   shell run-as Mono.Android_Tests cat "/data/user/0/Mono.Android_Tests/files/.__override__/TestResults.xml" failed with exit code 1

While the "same" command on [PR build dotnet#4003][1] uses an external path:

	RunTestApks:
	  ...
	  Executing: /Users/builder/android-toolchain/sdk/platform-tools/adb -s emulator-5570  shell run-as Mono.Android_Tests cat "/storage/emulated/0/Android/data/Mono.Android_Tests/files/Documents/TestResults.xml"
	    writing stdout to file: /Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/tests/../bin/TestDebug/TestResult-Mono.Android_Tests.xml

*Why* do these paths differ?

The paths differ -- internal storage on master, external on PR builds
-- because `Xamarin.Android.NUnitLite.dll` only uses
[external storage directories][2] when it's built against a
`$(TargetFrameworkVersion)` value >= v4.4.

This is true on PR builds, where we only build one API level,
`$(AndroidFrameworkVersion)`, currently v9.0 (API-28).

This is *not* true on master builds where we build for *all* API
levels, and "really" build `Xamarin.Android.NUnitLite.dll` for the
[*first* supported API level][3], v2.3 (API-10)!

Update the `Xamarin.Android.NUnitLite.dll` build within
`make framework-assemblies` so that instead of building for the
*first* API level, we build for the *last* API level.

This should allow our unit tests to work sanely on "full" builds.

Additionally, update/"partially revert" the
`<RunInstrumentationTests/>` task so that it *always* performs
`adb pull` to extract `TestResults.xml`, instead of using
`adb shell run-as ... cat ...`, as introduced in 2e8f96f.
The problem with `run-as ... cat` is that it doesn't work with
non-debuggable packages, e.g. if you have a
`Mono.Android_Tests-Signed.apk` built in the `Release` configuration,
`run-as` will *fail*:

	$ adb shell run-as Mono.Android_Tests cat /storage/emulated/0/Android/data/Mono.Android_Tests/files/Documents/TestResults.xml
	run-as: package not debuggable: Mono.Android_Tests

Instead of special-casing `<RunInstrumentationTests/>` to try using
`run-as` in some circumstances and `pull` in others, "revert" to
pre-2e8f96f5 behavior and always use `adb pull`.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/1166/
[1]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-pr-builder/4003/
[2]: https://github.com/xamarin/xamarin-android/blob/e153d42e51d36170487b3081c55310d978685b06/src/Xamarin.Android.NUnitLite/Gui/Instrumentations/TestSuiteInstrumentation.cs#L107-L110
[3]: https://github.com/xamarin/xamarin-android/blob/e153d42e51d36170487b3081c55310d978685b06/build-tools/scripts/BuildEverything.mk#L113-L118
grendello pushed a commit that referenced this pull request Sep 14, 2018
We've been dealing with a head-scratching annoyance: `.apk` test would
execute, pass, and have their `TestResults.xml` files extractable when
the PR builds run the `.apk` tests, but *not* when `master` does.

This makes it difficult to know whether or not we've broken anything.

One "interesting" observation we've had is that the paths *differ* on
the "downloadable" vs. "undownloadable" builds.  For example,
[master build #1166][0] uses an internal storage path:

	RunTestApks
	  ...
	  Executing: /Users/builder/android-toolchain/sdk/platform-tools/adb   shell run-as Mono.Android_Tests cat "/data/user/0/Mono.Android_Tests/files/.__override__/TestResults.xml"
	    writing stdout to file: /Users/builder/jenkins/workspace/xamarin-android/xamarin-android/tests/../bin/TestRelease/TestResult-Mono.Android_Tests.xml
	…/xamarin-android/build-tools/scripts/TestApks.targets(188,5): error :   Command /Users/builder/android-toolchain/sdk/platform-tools/adb   shell run-as Mono.Android_Tests cat "/data/user/0/Mono.Android_Tests/files/.__override__/TestResults.xml" failed with exit code 1

While the "same" command on [PR build #4003][1] uses an external path:

	RunTestApks:
	  ...
	  Executing: /Users/builder/android-toolchain/sdk/platform-tools/adb -s emulator-5570  shell run-as Mono.Android_Tests cat "/storage/emulated/0/Android/data/Mono.Android_Tests/files/Documents/TestResults.xml"
	    writing stdout to file: /Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/tests/../bin/TestDebug/TestResult-Mono.Android_Tests.xml

*Why* do these paths differ?

The paths differ -- internal storage on master, external on PR builds
-- because `Xamarin.Android.NUnitLite.dll` only uses
[external storage directories][2] when it's built against a
`$(TargetFrameworkVersion)` value >= v4.4.

This is true on PR builds, where we only build one API level,
`$(AndroidFrameworkVersion)`, currently v9.0 (API-28).

This is *not* true on master builds where we build for *all* API
levels, and "really" build `Xamarin.Android.NUnitLite.dll` for the
[*first* supported API level][3], v2.3 (API-10)!

Update the `Xamarin.Android.NUnitLite.dll` build within
`make framework-assemblies` so that instead of building for the
*first* API level, we build for the *last* API level.

This should allow our unit tests to work sanely on "full" builds.

Additionally, update/"partially revert" the
`<RunInstrumentationTests/>` task so that it *always* performs
`adb pull` to extract `TestResults.xml`, instead of using
`adb shell run-as ... cat ...`, as introduced in 2e8f96f.
The problem with `run-as ... cat` is that it doesn't work with
non-debuggable packages, e.g. if you have a
`Mono.Android_Tests-Signed.apk` built in the `Release` configuration,
`run-as` will *fail*:

	$ adb shell run-as Mono.Android_Tests cat /storage/emulated/0/Android/data/Mono.Android_Tests/files/Documents/TestResults.xml
	run-as: package not debuggable: Mono.Android_Tests

Instead of special-casing `<RunInstrumentationTests/>` to try using
`run-as` in some circumstances and `pull` in others, "revert" to
pre-2e8f96f5 behavior and always use `adb pull`.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/1166/
[1]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-pr-builder/4003/
[2]: https://github.com/xamarin/xamarin-android/blob/e153d42e51d36170487b3081c55310d978685b06/src/Xamarin.Android.NUnitLite/Gui/Instrumentations/TestSuiteInstrumentation.cs#L107-L110
[3]: https://github.com/xamarin/xamarin-android/blob/e153d42e51d36170487b3081c55310d978685b06/build-tools/scripts/BuildEverything.mk#L113-L118
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Sep 14, 2018
We've been dealing with a head-scratching annoyance: `.apk` test would
execute, pass, and have their `TestResults.xml` files extractable when
the PR builds run the `.apk` tests, but *not* when `master` does.

This makes it difficult to know whether or not we've broken anything.

One "interesting" observation we've had is that the paths *differ* on
the "downloadable" vs. "undownloadable" builds.  For example,
[master build dotnet#1166][0] uses an internal storage path:

	RunTestApks
	  ...
	  Executing: /Users/builder/android-toolchain/sdk/platform-tools/adb   shell run-as Mono.Android_Tests cat "/data/user/0/Mono.Android_Tests/files/.__override__/TestResults.xml"
	    writing stdout to file: /Users/builder/jenkins/workspace/xamarin-android/xamarin-android/tests/../bin/TestRelease/TestResult-Mono.Android_Tests.xml
	…/xamarin-android/build-tools/scripts/TestApks.targets(188,5): error :   Command /Users/builder/android-toolchain/sdk/platform-tools/adb   shell run-as Mono.Android_Tests cat "/data/user/0/Mono.Android_Tests/files/.__override__/TestResults.xml" failed with exit code 1

While the "same" command on [PR build dotnet#4003][1] uses an external path:

	RunTestApks:
	  ...
	  Executing: /Users/builder/android-toolchain/sdk/platform-tools/adb -s emulator-5570  shell run-as Mono.Android_Tests cat "/storage/emulated/0/Android/data/Mono.Android_Tests/files/Documents/TestResults.xml"
	    writing stdout to file: /Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/tests/../bin/TestDebug/TestResult-Mono.Android_Tests.xml

*Why* do these paths differ?

The paths differ -- internal storage on master, external on PR builds
-- because `Xamarin.Android.NUnitLite.dll` only uses
[external storage directories][2] when it's built against a
`$(TargetFrameworkVersion)` value >= v4.4.

This is true on PR builds, where we only build one API level,
`$(AndroidFrameworkVersion)`, currently v9.0 (API-28).

This is *not* true on master builds where we build for *all* API
levels, and "really" build `Xamarin.Android.NUnitLite.dll` for the
[*first* supported API level][3], v2.3 (API-10)!

Update the `Xamarin.Android.NUnitLite.dll` build within
`make framework-assemblies` so that instead of building for the
*first* API level, we build for the *last* API level.

This should allow our unit tests to work sanely on "full" builds.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/1166/
[1]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-pr-builder/4003/
[2]: https://github.com/xamarin/xamarin-android/blob/e153d42e51d36170487b3081c55310d978685b06/src/Xamarin.Android.NUnitLite/Gui/Instrumentations/TestSuiteInstrumentation.cs#L107-L110
[3]: https://github.com/xamarin/xamarin-android/blob/e153d42e51d36170487b3081c55310d978685b06/build-tools/scripts/BuildEverything.mk#L113-L118
jonpryor added a commit that referenced this pull request Sep 15, 2018
We've been dealing with a head-scratching annoyance: `.apk` test would
execute, pass, and have their `TestResults.xml` files extractable when
the PR builds run the `.apk` tests, but *not* when `master` does.

This makes it difficult to know whether or not we've broken anything.

One "interesting" observation we've had is that the paths *differ* on
the "downloadable" vs. "undownloadable" builds.  For example,
[master build #1166][0] uses an internal storage path:

	RunTestApks
	  ...
	  Executing: /Users/builder/android-toolchain/sdk/platform-tools/adb   shell run-as Mono.Android_Tests cat "/data/user/0/Mono.Android_Tests/files/.__override__/TestResults.xml"
	    writing stdout to file: /Users/builder/jenkins/workspace/xamarin-android/xamarin-android/tests/../bin/TestRelease/TestResult-Mono.Android_Tests.xml
	…/xamarin-android/build-tools/scripts/TestApks.targets(188,5): error :   Command /Users/builder/android-toolchain/sdk/platform-tools/adb   shell run-as Mono.Android_Tests cat "/data/user/0/Mono.Android_Tests/files/.__override__/TestResults.xml" failed with exit code 1

While the "same" command on [PR build #4003][1] uses an external path:

	RunTestApks:
	  ...
	  Executing: /Users/builder/android-toolchain/sdk/platform-tools/adb -s emulator-5570  shell run-as Mono.Android_Tests cat "/storage/emulated/0/Android/data/Mono.Android_Tests/files/Documents/TestResults.xml"
	    writing stdout to file: /Users/builder/jenkins/workspace/xamarin-android-pr-builder/xamarin-android/tests/../bin/TestDebug/TestResult-Mono.Android_Tests.xml

*Why* do these paths differ?

The paths differ -- internal storage on master, external on PR builds
-- because `Xamarin.Android.NUnitLite.dll` only uses
[external storage directories][2] when it's built against a
`$(TargetFrameworkVersion)` value >= v4.4.

This is true on PR builds, where we only build one API level,
`$(AndroidFrameworkVersion)`, currently v9.0 (API-28).

This is *not* true on master builds where we build for *all* API
levels, and "really" build `Xamarin.Android.NUnitLite.dll` for the
[*first* supported API level][3], v2.3 (API-10)!

Update the `Xamarin.Android.NUnitLite.dll` build within
`make framework-assemblies` so that instead of building for the
*first* API level, we build for the *last* API level.

This should allow our unit tests to work sanely on "full" builds.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/1166/
[1]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-pr-builder/4003/
[2]: https://github.com/xamarin/xamarin-android/blob/e153d42e51d36170487b3081c55310d978685b06/src/Xamarin.Android.NUnitLite/Gui/Instrumentations/TestSuiteInstrumentation.cs#L107-L110
[3]: https://github.com/xamarin/xamarin-android/blob/e153d42e51d36170487b3081c55310d978685b06/build-tools/scripts/BuildEverything.mk#L113-L118
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Mar 10, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant