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

Unified Diff: tools/telemetry/telemetry/core/platform/desktop_platform_backend.py

Issue 22300013: Add a Telemetry based cold startup test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use one benchmark file Created 7 years, 4 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: tools/telemetry/telemetry/core/platform/desktop_platform_backend.py
diff --git a/tools/telemetry/telemetry/core/platform/desktop_platform_backend.py b/tools/telemetry/telemetry/core/platform/desktop_platform_backend.py
index 70f0626d9f8fe9c7dcaa36f722a133b8278ac51b..b71deab49c9c46fb5af0f0af22b62581e4917fcd 100644
--- a/tools/telemetry/telemetry/core/platform/desktop_platform_backend.py
+++ b/tools/telemetry/telemetry/core/platform/desktop_platform_backend.py
@@ -22,7 +22,7 @@ class DesktopPlatformBackend(platform_backend.PlatformBackend):
flush_command_mtime = 0
chrome_root = util.GetChromiumSrcDir()
- for build_type, build_dir in util.BuildDirectoryIterator():
+ for build_dir, build_type in util.GetBuildDirectories():
candidate = os.path.join(chrome_root, build_dir, build_type,
self.GetFlushUtilityName())
if os.access(candidate, os.X_OK):
@@ -43,9 +43,12 @@ class DesktopPlatformBackend(platform_backend.PlatformBackend):
args = [flush_command, '--recurse']
directory_contents = os.listdir(directory)
for item in directory_contents:
- if item not in ignoring:
+ if not ignoring or item not in ignoring:
args.append(os.path.join(directory, item))
+ if len(args) < 3:
+ return
+
p = subprocess.Popen(args)
p.wait()
assert p.returncode == 0, 'Failed to flush system cache'

Powered by Google App Engine
This is Rietveld 408576698