Chromium Code Reviews| 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()) |