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

[Xamarin.Android.Build.Tasks] Install mono-symbolicate scripts #425

Merged

Conversation

jonpryor
Copy link
Member

@jonpryor jonpryor commented Feb 8, 2017

Commit 781a854 broke unit test execution, introducing failures
in the unit tests:

  • Xamarin.Android.Build.Tests.PackagingTest.CheckBuildIdIsUnique
  • Xamarin.Android.Build.Tests.PackagingTest.CheckManagedSymbolsArchive(True,True,True)

The cause1 is shown in the build.log for the failing test:

.../xamarin-android/bin/Debug/lib/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error :
Command '".../bin/Debug/bin/mono-symbolicate" store-symbols "bin/Release/UnnamedProject.UnnamedProject.apk.mSYM" "obj/Release/android/assets"'
exited with code: 127.

Exit code 127 is "No such file or directory", i.e. there is no
bin/mono-symbolicate file.

This is "odd", because the _BuildMonoSymbolicate target was kept in
Xamarin.Android.Build.Tasks.targets precisely so it could create
those files...

...except the _BuildMonoSymbolicate target isn't executed:

Skipping target "_BuildMonoSymbolicate" because its outputs are up-to-date

Oops.

Thus we see the error of our ways: the _BuildMonoSymbolicate
target's input is mono-symbolicate.exe.sources, which isn't touched,
and it's output is mono-symbolicate.exe, which is now generated by
mono-runtimes.targets. These inputes and outputs need fixing to
ensure that the mono-symbolicate scripts are installed.

Rename the _BuildMonoSymbolicate target to
_BuildMonoSymbolicateScripts, and provide appropriate Inputs and
Outputs so that the scripts are installed. This fixes the tests.

  1. Login to Jenkins
  2. Click the Workspace link.
  3. Navigate to xamarin-android/bin/TestDebug/temp
  4. The temp directory contains project folders for the failing
    tests, including build logs.

Footnotes

  1. Note that the cause link is "unstable"; it's a
    "workspace-relative" link, and may not exist from build to build.
    For future reference, to view those build.log files:

Commit 781a854 [broke unit test execution][0], introducing failures
in the unit tests:

* `Xamarin.Android.Build.Tests.PackagingTest.CheckBuildIdIsUnique`
* `Xamarin.Android.Build.Tests.PackagingTest.CheckManagedSymbolsArchive(True,True,True)`

[The cause][1][^1] is shown in the `build.log` for the failing test:

	.../xamarin-android/bin/Debug/lib/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error :
	Command '".../bin/Debug/bin/mono-symbolicate" store-symbols "bin/Release/UnnamedProject.UnnamedProject.apk.mSYM" "obj/Release/android/assets"'
	exited with code: 127.

Exit code 127 is "No such file or directory", i.e. there is no
`bin/mono-symbolicate` file.

This is "odd", because the `_BuildMonoSymbolicate` target was kept in
`Xamarin.Android.Build.Tasks.targets` precisely so it *could* create
those files...

...[except the `_BuildMonoSymbolicate` target isn't executed][2]:

	Skipping target "_BuildMonoSymbolicate" because its outputs are up-to-date

Oops.

Thus we see the error of our ways: the `_BuildMonoSymbolicate`
target's input is `mono-symbolicate.exe.sources`, which isn't touched,
and it's output is `mono-symbolicate.exe`, which is now generated by
`mono-runtimes.targets`. These inputes and outputs need fixing to
ensure that the `mono-symbolicate` scripts are installed.

Rename the `_BuildMonoSymbolicate` target to
`_BuildMonoSymbolicateScripts`, and provide appropriate `Inputs` and
`Outputs` so that the scripts are installed. This fixes the tests.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/236/testReport/
[1]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/ws/xamarin-android/bin/TestDebug/temp/CheckBuildIdIsUnique/build.log/*view*/
[2]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/236/consoleText

[^1]: Note that [the cause][1] link is "unstable"; it's a
  "workspace-relative" link, and may not exist from build to build.
  For future reference, to view those `build.log` files:

  1. Login to Jenkins
  2. Click the [Workspace](https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/ws/) link.
  3. Navigate to xamarin-android/bin/TestDebug/temp
  4. The `temp` directory contains project folders for the failing
      tests, including build logs.
@jonpryor jonpryor force-pushed the jonp-fix-mono-symbolicate-tests branch from c697cda to 8977007 Compare February 8, 2017 02:54
@radekdoulik radekdoulik merged commit 1380669 into dotnet:master Feb 8, 2017
radekdoulik added a commit to radekdoulik/xamarin-android that referenced this pull request Jun 4, 2019
Changes:

    [Java.Interop] JniMethodInfo.ToString() shouldn't throw (dotnet#425)
    [java-interop] Migrate to C++ (dotnet#427)
    Fix build with newer cecil (from overriden source path) (dotnet#428)
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 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.

3 participants