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

Unified Diff: systrace/profile_chrome/chrome_tracing_agent.py

Issue 2295913002: Enable some profile_chrome unit tests on Trybots (Closed) Base URL: https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Patch Set: Disable DDMS test because it is flaky Created 4 years, 3 months 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: systrace/profile_chrome/chrome_tracing_agent.py
diff --git a/systrace/profile_chrome/chrome_tracing_agent.py b/systrace/profile_chrome/chrome_tracing_agent.py
index 4886228324f6ea8931e22a96edc05d48b8ad4cbe..fecd7af42e6935e28ca4442243104e49b5ea5166 100644
--- a/systrace/profile_chrome/chrome_tracing_agent.py
+++ b/systrace/profile_chrome/chrome_tracing_agent.py
@@ -7,10 +7,10 @@ import optparse
import os
import py_utils
import re
+from profile_chrome import util
from devil.android import device_errors
from devil.android.sdk import intent
-
from systrace import trace_result
from systrace import tracing_agents
@@ -40,6 +40,9 @@ class ChromeTracingAgent(tracing_agents.TracingAgent):
@staticmethod
def GetCategories(device, package_info):
+ curr_browser = util.GetChromeProcessID(device, package_info)
Sami 2016/09/09 10:28:25 I don't think the agents should be trying to start
washingtonp 2016/09/09 18:07:29 Done.
+ if curr_browser == None:
+ util.StartBrowser(device, package_info)
with device.GetLogcatMonitor() as logmon:
device.BroadcastIntent(intent.Intent(
action='%s.GPU_PROFILER_LIST_CATEGORIES' % package_info.package))
@@ -64,6 +67,9 @@ class ChromeTracingAgent(tracing_agents.TracingAgent):
@py_utils.Timeout(tracing_agents.START_STOP_TIMEOUT)
def StartAgentTracing(self, config, timeout=None):
+ curr_browser = util.GetChromeProcessID(self._device, self._package_info)
+ if curr_browser == None:
+ util.StartBrowser(self._device, self._package_info)
self._categories = _ComputeChromeCategories(config)
self._logcat_monitor.Start()
start_extras = {'categories': ','.join(self._categories)}

Powered by Google App Engine
This is Rietveld 408576698