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

Commit bfd2d216 authored by Hyundo Moon's avatar Hyundo Moon
Browse files

Use test app's data folder as filter directory

During a retry, test methods to be retried are written into a
file, pushed onto device and read by the test instrumentation
for execution.

The default location for such filter file is /data/local/tmp,
which is prohibited for access by system uid packages, such
as the system UI tests package.

This change uses the test app's data folder for filter: this
is not generally applicable for all the tests since root
permission is required, but it is a relatively safe assumption
in case of testing against system uid pakcages since it
implies userdebug build is being used.

(Commit message was copied from 7d6a7c5)

Bug: 255088822
Test: atest BluetoothInstrumentationTests
Change-Id: I8e1239d9715e127108ce67365ea8ee4af6663a1b
parent a3ba861f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -20,6 +20,9 @@
        <option name="cleanup-apks" value="true" />
        <option name="test-file-name" value="BluetoothInstrumentationTests.apk" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
        <option name="force-root" value="true" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
        <option name="run-command" value="settings put global ble_scan_always_enabled 0" />
        <option name="run-command" value="su u$(am get-current-user)_system svc bluetooth disable" />
@@ -32,6 +35,7 @@
    <option name="test-tag" value="BluetoothInstrumentationTests" />
    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
        <option name="package" value="com.android.bluetooth.tests" />
        <option name="test-filter-dir" value="/data/data/{PACKAGE}/cache" />
        <option name="hidden-api-checks" value="false"/>
    </test>