Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7e97b72 authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Use RunHostCommandTargetPreparer to enable TAPL

Currently the flicker tests use the GoogleDeviceSetup to activate TAPL
and allow the launcher instrumentation to execute. This method, however
did not work under all conditions and resulted in b/153565763.

To fix this problem we now run the commands with RunHostCommandTargetPreparer.

Test: On a freshly flashed and wiped device run atest FlickerTests
Bug: 153565763
Change-Id: Ia5878ad9ca832be03d3ec3e1f93ca810db121706
parent d9f9bf34
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -13,8 +13,12 @@
        <option name="run-command" value="cmd window tracing level all" />
        <!-- inform WM to log all transactions -->
        <option name="run-command" value="cmd window tracing transaction" />
        <!-- restart launcher to activate TAPL -->
        <option name="run-command" value="setprop ro.test_harness 1 ; am force-stop com.google.android.apps.nexuslauncher" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.RunHostCommandTargetPreparer" >
        <!-- Prevent TAPL error for Nexus Launcher (http://go/tapl) -->
        <option name="host-setup-command" value="adb root" />
        <option name="host-setup-command" value="adb shell setprop ro.test_harness 1" />
        <option name="host-setup-command" value="adb shell am force-stop com.google.android.apps.nexuslauncher" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.DeviceCleaner">
        <!-- reboot the device to teardown any crashed tests -->