Skip to content

Commit 0435a91

Browse files
authored
[build] Add make package-test-errors target (#1366)
Sometimes a PR build will [fail][0]. That's to be expected! ;-) [0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-pr-builder/2600/ However, sometimes the error message is [largely useless][1]: [1]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-pr-builder/2600/testReport/junit/Xamarin.Android.Build.Tests.BuildTest/BuildAotApplicationAndBundle/Xamarin_Android_Build_Tests_BuildTest_BuildAotApplicationAndBundle__armeabi_v7a__False_True____Debug/ MESSAGE: Build should have succeeded. Expected: True But was: False STACK TRACE: at Xamarin.Android.Build.Tests.BuildTest.BuildAotApplicationAndBundle (System.String supportedAbis, System.Boolean enableLLVM, System.Boolean expectedResult) That's not helpful at all. In such circumstanes, the usual "fallback" path is to check the Jenkins [**Workspace**][2], then pray that the mentioned failing projects *still exist*. The problem here is that the Workspace is cleared on *every* Jenkins build (for a specific job), so if another PR build has started, the Workspace for the previous build is no longer accessible. [2]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-pr-builder/ws/ Add a new `make package-test-errors` target. When called, *if* there are any error projects within `bin/Test*/temp`, they will be packaged up into `test-errors.zip`. We can then upload `test-errors.zip` to Azure -- along with the other PR build outputs -- allowing for saner determination of What Went Wrong™, allowing the PR to be fixed.
1 parent 7e42664 commit 0435a91

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build-tools/scripts/BuildEverything.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,8 @@ package-deb: $(ZIP_OUTPUT)
200200
ln -sf $(ZIP_OUTPUT) xamarin.android-oss_$(PRODUCT_VERSION).$(-num-commits-since-version-change).orig.tar.bz2
201201
cd $(ZIP_OUTPUT_BASENAME) && DEBEMAIL="Xamarin Public Jenkins (auto-signing) <[email protected]>" dch --create -v $(PRODUCT_VERSION).$(-num-commits-since-version-change) --package xamarin.android-oss --force-distribution --distribution alpha "New release - please see git log for $(GIT_COMMIT)"
202202
cd $(ZIP_OUTPUT_BASENAME) && dpkg-buildpackage -us -uc -rfakeroot
203+
204+
package-test-errors:
205+
ifneq ($(wildcard bin/Test*/temp),)
206+
zip -r test-errors.zip bin/Test*/temp
207+
endif # We have test error output

0 commit comments

Comments
 (0)