Commit 7b51fd1
authored
Bump to xamarin/monodroid@27736a7f; add multi-user tests (#5311)
Context: #5331
Changes: xamarin/monodroid@0eef889...27736a7
* xamarin/monodroid@27736a7ff: [tools/msbuild] Fix App Bundle deployment (#1142)
* xamarin/monodroid@f38dbc7ab: [tools/msbuild] use @(_AndroidMSBuildAllProjects) (#1140)
* xamarin/monodroid@cfa21d57b: [tools/msbuild] Fix some issues with FastDev (#1139)
* xamarin/monodroid@3ba648386: [tools/msbuild] Add missing parameter to BuildAppBundle. (#1138)
* xamarin/monodroid@5bb29971b: [tools/msbuild] Add Multi User Support for Debugging. (#1135)
* xamarin/monodroid@156abf47c: [tools/msbuild] default $(_AndroidAllowDeltaInstall) to false (#1137)
* xamarin/monodroid@fbc961218: [build] Pass EnableCompression to BuildApk (#1094)
Add support for running multi-user unit tests on device. It makes
use of various adb commands to create test users and remove them.
Create a guest user with name `{name}`:
adb shell pm create-user --guest {name}
Remove a guest user with the specified user id `{userId}`:
adb shell pm remove-user --guest {userId}
Note that user creation takes a "name", while deletion takes an id.
To obtain the mapping, use:
$ adb shell pm list users
Users:
UserInfo{0:Owner:c13} running
UserInfo{10:guest1:414}
The userId is the number *between* the `{` and the `:` and user name.
The userId for `Owner` is 0, while the userId for `guest1` is 10.
We can then use a `Regex` to pull out the required `userId` for a
specific user.
To switch a device to use user `{userId}`:
adb shell am switch-user {userId}
Emulators seem to create the main user with the name "Owner", so that
should be the default name we use for the main user. In the unit
tests if we cannot find a user named "Owner" when looking for "Owner"
we will default to a `userId` of `0`. User ID 0 always means the
default user. This is to handle the case where we are testing locally
on devices where the main user is not called "Owner".1 parent 7808c01 commit 7b51fd1
File tree
7 files changed
+139
-8
lines changed- Documentation
- guides/building-apps
- release-notes
- src/Xamarin.Android.Build.Tasks/Tests
- Xamarin.Android.Build.Tests/Utilities
- Xamarin.ProjectTools/Android
- tests/MSBuildDeviceIntegration/Tests
7 files changed
+139
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
277 | 301 | | |
278 | 302 | | |
279 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
260 | 264 | | |
261 | 265 | | |
262 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
263 | 304 | | |
264 | 305 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
251 | 252 | | |
252 | 253 | | |
253 | 254 | | |
| 255 | + | |
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
257 | 259 | | |
258 | 260 | | |
| 261 | + | |
259 | 262 | | |
260 | 263 | | |
261 | 264 | | |
262 | 265 | | |
263 | 266 | | |
| 267 | + | |
264 | 268 | | |
265 | 269 | | |
266 | 270 | | |
267 | 271 | | |
268 | 272 | | |
| 273 | + | |
269 | 274 | | |
270 | 275 | | |
271 | 276 | | |
272 | 277 | | |
273 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
274 | 292 | | |
275 | 293 | | |
276 | 294 | | |
277 | 295 | | |
278 | 296 | | |
279 | 297 | | |
280 | | - | |
| 298 | + | |
281 | 299 | | |
282 | 300 | | |
283 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
284 | 312 | | |
285 | 313 | | |
286 | 314 | | |
| |||
291 | 319 | | |
292 | 320 | | |
293 | 321 | | |
294 | | - | |
| 322 | + | |
295 | 323 | | |
296 | 324 | | |
297 | 325 | | |
| |||
324 | 352 | | |
325 | 353 | | |
326 | 354 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
332 | 362 | | |
333 | 363 | | |
334 | 364 | | |
| |||
0 commit comments