Skip to content

Conversation

@pjcollins
Copy link
Member

@pjcollins pjcollins commented Jan 28, 2022

Fixes .apk/.aab file uploads when an apk test configuration fails.

The filters for log file uploading have also been improved to avoid a
situaton where we attempt to upload a file with the same name twice:

Copying file '/Users/runner/work/1/s/xamarin-android/bin/TestRelease/logcat-Release-full.log' to '/Users/runner/work/1/a/TestRelease/logcat-Release-full.log' (overwrite destination: False)
Copying file '/Users/runner/work/1/s/xamarin-android/bin/TestRelease/logcat-ReleaseAab-Mono.Android.NET_Tests.txt' to '/Users/runner/work/1/a/TestRelease/logcat-ReleaseAab-Mono.Android.NET_Tests.txt' (overwrite destination: False)
...
Copying file '/Users/runner/work/1/s/xamarin-android/bin/TestRelease/logcat-Release-full.log' to '/Users/runner/work/1/a/TestRelease/logcat-Release-full.log' (overwrite destination: False)

Step Xamarin.Android.Prepare.Step_CopyExtraResultFilesForCI failed: The file '/Users/runner/work/1/a/TestRelease/logcat-Release-full.log' already exists.
System.InvalidOperationException: Step Xamarin.Android.Prepare.Step_CopyExtraResultFilesForCI failed: The file '/Users/runner/work/1/a/TestRelease/logcat-Release-full.log' already exists.
 ---> System.IO.IOException: The file '/Users/runner/work/1/a/TestRelease/logcat-Release-full.log' already exists.

The logcat-Release-full.log file matched both logcat* and *log
upload file filters. Attempts to copy it twice would fail, which caused
us to miss certain files in the test result output that was eventually
uploaded.

MSBuild .binlog files will now be uploaded as test attachments for
failing tests.

@pjcollins
Copy link
Member Author

Uploads for .apks/.aabs are working again in a trial run:
image

@pjcollins pjcollins changed the title [ci] Fix .apk and logcat file uploading [ci] Improve test failure content uploads Jan 28, 2022
@pjcollins
Copy link
Member Author

Looks like binlog test attachments are also working, which should save some time and avoid full artifact downloads in some cases:
image

@pjcollins pjcollins marked this pull request as ready for review January 28, 2022 18:21
@pjcollins pjcollins merged commit ce0d212 into dotnet:main Jan 28, 2022
@pjcollins pjcollins deleted the apktest-results branch January 28, 2022 20:57
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 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