Commit b485425
authored
[Xamarin.Android.Build.Tests] Improve logcat logging in failed tests (#7816)
I noticed that more often than not, we don't see the actual error in
`logcat-failed.log` when the test fails on CI, but when it runs
locally, we can see the issue logged properly.
I'm not 100% what causes it on CI, but I suspect that we might be
facing a problem with the logcat buffer wrapping around and
overwriting the interesting data. This might be because of the fact
that `adb logcat -c` runs only once per *class* containing tests and
also because we log too quickly after the app quits.
To remedy the former, run `adb logcat -c` before each *test* starts.
To attempt a fix for the latter, pause for 1 second before dumping
logcat buffer after the test fails.1 parent ebd7dff commit b485425
File tree
1 file changed
+7
-1
lines changed- src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
| |||
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| |||
0 commit comments