Skip to content

Conversation

@jonpryor
Copy link
Contributor

@jonpryor jonpryor commented May 4, 2018

The xamarin-android Jenkins job isn't green, but it's not because
of any failing unit tests; 81ef825 fixed the last known unit test
failure.

This leaves us wondering: what's broken now?

Fortunately we have logs, e.g. build #987:

Resources/drawable/android_button.xml(4): error APT0000: No resource found that matches the given name (at 'drawable' with value '@drawable/AndroidPressed'). […/xamarin-android/src/Mono.Android/Test/Mono.Android-Tests.csproj]
Resources/drawable/android_button.xml(4): error APT0000: No resource found that matches the given name (at 'drawable' with value '@drawable/AndroidPressed'). […/xamarin-android/src/Mono.Android/Test/Mono.Android-Tests.csproj]
…/xamarin-android/build-tools/scripts/RunTests.targets(87,5): error MSB3073: The command "…/xamarin-android/build-tools/scripts/../../bin/Release/bin/xabuild …/xamarin-android/build-tools/scripts/../../src/Mono.Android/Test/Mono.Android-Tests.csproj /t:SignAndroidPackage /p:Configuration=Release /p:XAIntegratedTests=False /p:AotAssemblies=True" exited with code 1.

Now we know why it's failing, we review the log file, and...

There's no diagnostic output for that failing build.

(Insert screaming & crying here.)

Fortunately we've been able to since repro the issue (fix pending),
but that's not quite the point/problem.

The problem is that figuring out what went wrong with the above
command would have been much easier if we had diagnostic output.

Update the e.g. RunApkTests MSBuild target so that if the $V
environment variable is not an empty string, we add /v:diag to
xabuild invocations. This permits straightforward make use:

$ make run-all-tests CONFIGURATION=Release V=1
# Unit test builds *also* produce diagnostic build output!

The [xamarin-android Jenkins job][0] isn't green, but it's not because
of any failing unit tests; 81ef825 fixed the last known unit test
failure.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/

This leaves us wondering: what's broken *now*?

Fortunately we have logs, e.g. [build dotnet#987][1]:

[1]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/987/

	Resources/drawable/android_button.xml(4): error APT0000: No resource found that matches the given name (at 'drawable' with value '@drawable/AndroidPressed'). […/xamarin-android/src/Mono.Android/Test/Mono.Android-Tests.csproj]
	Resources/drawable/android_button.xml(4): error APT0000: No resource found that matches the given name (at 'drawable' with value '@drawable/AndroidPressed'). […/xamarin-android/src/Mono.Android/Test/Mono.Android-Tests.csproj]
	…/xamarin-android/build-tools/scripts/RunTests.targets(87,5): error MSB3073: The command "…/xamarin-android/build-tools/scripts/../../bin/Release/bin/xabuild …/xamarin-android/build-tools/scripts/../../src/Mono.Android/Test/Mono.Android-Tests.csproj /t:SignAndroidPackage /p:Configuration=Release /p:XAIntegratedTests=False /p:AotAssemblies=True" exited with code 1.

Now we know why it's failing, we review the log file, and...

There's no diagnostic output for that failing build.

(Insert screaming & crying here.)

Fortunately we've been able to since repro the issue (fix pending),
but that's not quite the point/problem.

The problem is that figuring out what went wrong with the above
command would have been *much* easier if we had diagnostic output.

Update the e.g. `RunApkTests` MSBuild target so that if the `$V`
environment variable is not an empty string, we add `/v:diag` to
`xabuild` invocations. This permits straightforward `make` use:

	$ make run-all-tests CONFIGURATION=Release V=1
	# Unit test builds *also* produce diagnostic build output!
<_XABuild>$(_TopDir)\bin\$(Configuration)\bin\xabuild</_XABuild>
<_XABuildProperties>/p:Configuration=$(Configuration) /p:XAIntegratedTests=$(XAIntegratedTests)</_XABuildProperties>
<_XABuildDiag Condition=" '$(V)' != '' ">/v:diag </_XABuildDiag>
<_XABuildProperties>$(_XABuildDiag)/p:Configuration=$(Configuration) /p:XAIntegratedTests=$(XAIntegratedTests)</_XABuildProperties>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't hold up this PR, but does it need a space?

$(_XABuildDiag)/p:Configuration=$(Configuration)

Should be:

$(_XABuildDiag) /p:Configuration=$(Configuration)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at the $(_XABuildDiag) definition: it has a trailing space. Therefore, no space is needed. here.

@jonpryor jonpryor merged commit 84a7a83 into dotnet:master May 5, 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants