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

Commit 6411a335 authored by Yan Wang's avatar Yan Wang Committed by Igor Murashkin
Browse files

startop: Fix a bug in iorap functional test.

The prefetching work runs on another process.
Grep everything to workaround it.

Bug: 137403231
Test: atest iorap-functional-tests
Change-Id: Iac1796cb22f0db83ac5ebd78cb40e5cc5ac3a930
(cherry picked from commit 7d76f014)
parent a52f95e5
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ public class IorapWorkFlowTest {
  private static final Duration TIMEOUT = Duration.ofSeconds(300L);

  private static final String READAHEAD_INDICATOR =
      "Description = /data/misc/iorapd/com.android.settings/none/com.android.settings.Settings/compiled_traces/compiled_trace.pb";
      "Description = /data/misc/iorapd/com.android.settings/-?\\d+/com.android.settings.Settings/compiled_traces/compiled_trace.pb";

  private UiDevice mDevice;

@@ -326,13 +326,13 @@ public class IorapWorkFlowTest {
      return false;
    }

    String log = executeShellCommand("logcat -s iorapd -d");
    String log = executeShellCommand("logcat -d");

    Pattern p = Pattern.compile(
    ".*" + READAHEAD_INDICATOR
            + ".*Total File Paths=(\\d+) \\(good: (\\d+)%\\)\n"
            + ".*Total Entries=(\\d+) \\(good: (\\d+)%\\)\n"
            + ".*Total Bytes=(\\d+) \\(good: (\\d+)%\\).*",
        + ".*Total File Paths=(\\d+) \\(good: (\\d+[.]?\\d*)%\\)\n"
        + ".*Total Entries=(\\d+) \\(good: (\\d+[.]?\\d*)%\\)\n"
        + ".*Total Bytes=(\\d+) \\(good: (\\d+[.]?\\d*)%\\).*",
    Pattern.DOTALL);
    Matcher m = p.matcher(log);