arm64-v8a CtsDevicePolicyManagerTestCases
com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_LeaveAllSystemApps fail java.lang.AssertionError: on-device tests failed:
log
java.lang.AssertionError: on-device tests failed:
com.android.cts.deviceowner.CreateAndManageUserTest#testCreateAndManageUser_LeaveAllSystemApps:
java.lang.Exception: junit.framework.AssertionFailedError: system apps not installed: [com.xxx.xxx, com.xxx.xxxx]
at com.android.cts.deviceowner.CreateAndManageUserTest$PrimaryUserService.assertCrossUserCallArrived(CreateAndManageUserTest.java:488)
at com.android.cts.deviceowner.CreateAndManageUserTest.testCreateAndManageUser_LeaveAllSystemApps(CreateAndManageUserTest.java:377)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:115)
at androidx.test.internal.runner.junit3.AndroidTestResult.runProtected(AndroidTestResult.java:73)
从log看是system app not install,这条测试过程中会创建用户,再用户下缺少log中的apk。
调查原因是因为apk配置了如下属性,导致其它用户下apk未安装
<config> <install-in-user-type package="com.xxx.xxx"> <install-in user-type="SYSTEM" /> </install-in-user-type>
</config>