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

Commit 6926c5a3 authored by Cosmin Băieș's avatar Cosmin Băieș
Browse files

Write to external storage for DumpOnFailure

This is a partial revert of [1], to write the DumpOnFailure files again
in external storage. Reading them with the FilePullerLogCollector from
the app files only works if the device is rooted, which will not be the
case on CTS tests.

This will instead write them to the directory given by
getExternalStorageDirectory. While the test config has the path of
"/sdcard/..." for reading the files, this will get resolved to the
actual external storage path.

  [1]: I6dece3f39a2f3ee3273b6ef12e3314f807d3457f

Flag: EXEMPT testfix
Bug: 399050749
Bug: 395783236
Test: atest InputMethodServiceTest
Change-Id: I5d2e63427c46800d032972b6d74ff9a55377fae7
parent fc2d0835
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -18,9 +18,6 @@
    <option name="test-suite-tag" value="apct" />
    <option name="test-suite-tag" value="apct-instrumentation" />

    <!-- Needed for reading the app files for the test artifacts -->
    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>

    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="cleanup-apks" value="true" />
        <option name="install-arg" value="-t" />
@@ -44,7 +41,7 @@

    <!-- Collect output of DumpOnFailure -->
    <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
        <option name="directory-keys" value="/data/user/0/com.android.apps.inputmethod.simpleime/files" />
        <option name="directory-keys" value="/sdcard/DumpOnFailure" />
        <option name="collect-on-run-ended-only" value="true" />
        <option name="clean-up" value="true" />
    </metrics_collector>
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,9 @@

    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />

    <!-- Enable writing output of DumpOnFailure to external storage -->
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />

    <application android:debuggable="true"
                 android:label="@string/app_name">
        <service