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

Unified Diff: content/test/ct/run_ct_dm.py

Issue 1469823003: Add CT DM isolate file and script that will be run on swarming slaves (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 5 years, 1 month 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
« chrome/ct_dm.isolate ('K') | « chrome/ct_dm.isolate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/ct/run_ct_dm.py
diff --git a/content/test/ct/run_ct_dm.py b/content/test/ct/run_ct_dm.py
new file mode 100755
index 0000000000000000000000000000000000000000..4a247dde3b42872e80bed49900b5d1cfecae5885
--- /dev/null
+++ b/content/test/ct/run_ct_dm.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+# Copyright (c) 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""This script is meant to be run on a Swarming bot."""
+
+import argparse
+import os
+import subprocess
+import sys
+
+
+PARENT_DIR = os.path.dirname(os.path.realpath(__file__))
+
+
+def _GetSkiaSrcDir():
+ return os.path.abspath(os.path.join(
M-A Ruel 2015/11/24 19:07:34 you mean normpath() instead of abspath(). But sin
rmistry 2015/11/24 20:12:24 Done.
+ PARENT_DIR, os.pardir, os.pardir, os.pardir, os.pardir, 'skia'))
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-s', '--slave_num', required=True,
M-A Ruel 2015/11/24 19:07:34 type=int?
rmistry 2015/11/24 20:12:24 Done.
+ help='The slave num of this CT run.')
+ args = parser.parse_args()
+
+ dm_path = os.path.join(_GetSkiaSrcDir(), 'out', 'Debug', 'dm')
M-A Ruel 2015/11/24 19:07:34 Could the relative path be a flag that defaults to
rmistry 2015/11/24 20:12:24 I do not see it ever changing. But I have been wro
+ skps_dir = os.path.join(
+ _GetSkiaSrcDir(), 'content', 'test', 'ct', 'slave%s' % args.slave_num,
+ 'skps')
+ resource_path = os.path.join(_GetSkiaSrcDir(), 'resources')
+
+ # TODO(rmistry): Double check the below DM configuration with mtklein@. We
+ # need a basic configuration that can help catch bugs like the ones listed in
+ # skbug.com/4416
+ cmd = [
+ dm_path,
+ '--src', 'skp',
+ '--skps', skps_dir,
+ '--resourcePath', resource_path,
+ '--config', '8888',
+ '--verbose',
+ ]
+ return subprocess.call(cmd)
+
+
+if __name__ == '__main__':
+ sys.exit(main())
« chrome/ct_dm.isolate ('K') | « chrome/ct_dm.isolate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698