Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1333)

Unified Diff: tools/telemetry/telemetry/internal/backends/android_app_backend.py

Issue 1510833002: [Telemetry] Googler Mobile First benchmark (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include devil in presubmit Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/internal/backends/android_app_backend.py
diff --git a/tools/telemetry/telemetry/internal/backends/android_app_backend.py b/tools/telemetry/telemetry/internal/backends/android_app_backend.py
index 96403beea9662f32f871a90fe2abb805935f3334..5504602c23c2c4e0c1bf35c072244d5537d255b9 100644
--- a/tools/telemetry/telemetry/internal/backends/android_app_backend.py
+++ b/tools/telemetry/telemetry/internal/backends/android_app_backend.py
@@ -46,8 +46,11 @@ class AndroidAppBackend(app_backend.AppBackend):
# TODO(slamm): check if the wait for "ps" check is really needed, or
# whether the "blocking=True" fall back is sufficient.
has_ready_predicate = self._is_app_ready_predicate is not None
- self.device.StartActivity(self._start_intent,
- blocking=not has_ready_predicate)
+ self.device.StartActivity(
+ self._start_intent,
+ blocking=not has_ready_predicate,
+ force_stop=True, # Make sure the app wasn't running before.
+ )
if has_ready_predicate:
util.WaitFor(is_app_ready, timeout=60)
@@ -87,7 +90,8 @@ class AndroidAppBackend(app_backend.AppBackend):
def GetProcesses(self, process_filter=None):
if process_filter is None:
- process_filter = lambda n: re.match('^' + self._default_process_name, n)
+ process_filter = lambda n: re.match(
+ '^%s(:|$)' % re.escape(self._default_process_name), n)
processes = set()
ps_output = self.platform_backend.GetPsOutput(['pid', 'name'])
« tools/perf/page_sets/mobile_first_story.py ('K') | « tools/perf/page_sets/mobile_first_story.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698