Commit d365a3b
authored
[build-tools] Bump Test emulator to use API-31 (#5257)
We need to be able to test our build system against newer emulators.
Include both API-30 and API-31 -based emulator images into our
nightly test pipeline `azure-pipelines-nightly.yaml`.
We will leave the normal CI tests running on API-29 for now as the
newer emulators seem to be reliable in a CI environment.
One of the changes is in the use of `Context.GetExternalFilesDir(null)`
to create a subdirectory within the external files directory. This is
due to [permissions changes which came into effect in API-30][0]:
> **Note**: On Android 11 (API level 30) and higher, apps cannot
> create their own app-specific directory on external storage.
As a result our previous code can no longer be used on newer devices.
We shall instead unify the tests to all use
`Context.GetExternalFilesDir(null)`, then use
`Context.FilesDir.AbsolutePath` as a backup.
The result of this change is we MUST use the `run-as` command to
retrieve the test log file for processing on API-30. This is because
the external directory is no longer readable globally on API-30; it
is only readable for the app. As a result we also need to make the
API-30 build of the test app "debuggable" via
`[Application (Debuggable=true)]`.
Thankfully this change was reverted somewhat in API-31, so we can
still `adb pull` from the directory returned by
`Context.GetExternalFilesDir(null);`.
Other changes include updating tests to include the `x86_64` abi.
This is because the newer x86_64 emulators no longer appear to be
able to run `x86` code.
[0]: https://developer.android.com/training/data-storage/app-specific#external-access-files1 parent b3cb3a9 commit d365a3b
File tree
36 files changed
+349
-217
lines changed- build-tools
- Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks
- automation
- yaml-templates
- check-boot-times
- scripts
- xaprepare/xaprepare
- ConfigAndData/Dependencies
- Steps
- samples/VSAndroidApp/Properties
- src
- Xamarin.Android.Build.Tasks/Tests
- Xamarin.Android.Build.Tests/Utilities
- Xamarin.ProjectTools/Resources/Base
- Xamarin.Android.NUnitLite/Gui/Instrumentations
- tests
- EmbeddedDSOs/EmbeddedDSO/Properties
- MSBuildDeviceIntegration/Tests
- Mono.Android-Tests
- Android.App
- Properties
- Runtime-AppBundle/Properties
- Runtime-Microsoft.Android.Sdk
- Runtime-MultiDex/Properties
- System.Net
- TestRunner.Core
36 files changed
+349
-217
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| |||
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
245 | | - | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
250 | | - | |
| 251 | + | |
251 | 252 | | |
252 | 253 | | |
253 | 254 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | | - | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
101 | | - | |
102 | 104 | | |
103 | 105 | | |
104 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
105 | 115 | | |
106 | 116 | | |
107 | 117 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | | - | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
89 | 102 | | |
90 | 103 | | |
91 | 104 | | |
| |||
113 | 126 | | |
114 | 127 | | |
115 | 128 | | |
116 | | - | |
| 129 | + | |
117 | 130 | | |
118 | 131 | | |
119 | 132 | | |
120 | 133 | | |
121 | | - | |
| 134 | + | |
122 | 135 | | |
123 | 136 | | |
124 | | - | |
| 137 | + | |
125 | 138 | | |
126 | 139 | | |
127 | 140 | | |
| |||
130 | 143 | | |
131 | 144 | | |
132 | 145 | | |
133 | | - | |
| 146 | + | |
134 | 147 | | |
135 | 148 | | |
136 | 149 | | |
137 | 150 | | |
138 | 151 | | |
139 | | - | |
| 152 | + | |
140 | 153 | | |
141 | 154 | | |
142 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
996 | 996 | | |
997 | 997 | | |
998 | 998 | | |
| 999 | + | |
999 | 1000 | | |
1000 | 1001 | | |
1001 | 1002 | | |
1002 | 1003 | | |
1003 | 1004 | | |
1004 | 1005 | | |
1005 | 1006 | | |
| 1007 | + | |
1006 | 1008 | | |
1007 | 1009 | | |
1008 | 1010 | | |
1009 | 1011 | | |
1010 | 1012 | | |
1011 | 1013 | | |
1012 | 1014 | | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
1013 | 1025 | | |
1014 | 1026 | | |
1015 | 1027 | | |
| |||
1040 | 1052 | | |
1041 | 1053 | | |
1042 | 1054 | | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
1043 | 1064 | | |
1044 | 1065 | | |
1045 | 1066 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | | - | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
165 | | - | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | | - | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
86 | | - | |
| 91 | + | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| |||
254 | 259 | | |
255 | 260 | | |
256 | 261 | | |
| 262 | + | |
257 | 263 | | |
258 | 264 | | |
259 | 265 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
0 commit comments