diff options
author | Nikita Ioffe <ioffe@google.com> | 2020-05-18 19:10:58 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-05-18 19:10:58 +0000 |
commit | 6e406aaec1302c78868a75cf850bde15ee1f73f6 (patch) | |
tree | 7745d5e9c0490ef349f50a7e18dcbe8cdbf57def | |
parent | 1f30ce31467ca4698d22ccfd3339f54551a04a41 (diff) | |
parent | 4d1b6ab991696ee1879766ab2c85911485b0e2b1 (diff) | |
download | platform_system_apex-6e406aaec1302c78868a75cf850bde15ee1f73f6.tar.gz platform_system_apex-6e406aaec1302c78868a75cf850bde15ee1f73f6.tar.bz2 platform_system_apex-6e406aaec1302c78868a75cf850bde15ee1f73f6.zip |
Merge "Force a GC in system_server before running ApexTestCases" into rvc-dev
-rw-r--r-- | apexd/AndroidTest.xml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apexd/AndroidTest.xml b/apexd/AndroidTest.xml index 085df982..6f65f4e6 100644 --- a/apexd/AndroidTest.xml +++ b/apexd/AndroidTest.xml @@ -36,6 +36,16 @@ <option name="push" value="apex.apexd_test_postinstall.apex->/system_ext/apex/apex.apexd_test_postinstall.apex" /> <option name="push" value="apex.apexd_test_preinstall.apex->/system_ext/apex/apex.apexd_test_preinstall.apex" /> </target_preparer> + + <!-- system_server might still hold a reference to apexservice. This means that apexd is still + running, and test apexes pushed in the PushFilePreparer above are not yet scanned. + One way to solve this is to reboot a device, but that would significantly increase + execution of this test module. Instead, force a GC in system_server by sending kill -10. --> + <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> + <option name="run-command" value="shell kill -10 $(pidof system_server)" /> + <option name="teardown-command" value="shell kill -10 $(pidof system_server)" /> + </target_preparer> + <test class="com.android.tradefed.testtype.GTest" > <!-- Note: despite how these lines read, the test will run nicely separated out of a subfolder. --> |