Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/env python | |
| 2 # Copyright (c) 2015 The Chromium Authors. All rights reserved. | |
| 3 # Use of this source code is governed by a BSD-style license that can be | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 """This script is meant to be run on a Swarming bot.""" | |
| 7 | |
| 8 import argparse | |
| 9 import os | |
| 10 import subprocess | |
| 11 import sys | |
| 12 | |
| 13 | |
| 14 PARENT_DIR = os.path.dirname(os.path.realpath(__file__)) | |
| 15 | |
| 16 | |
| 17 def _GetSkiaSrcDir(): | |
| 18 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.
| |
| 19 PARENT_DIR, os.pardir, os.pardir, os.pardir, os.pardir, 'skia')) | |
| 20 | |
| 21 | |
| 22 def main(): | |
| 23 parser = argparse.ArgumentParser() | |
| 24 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.
| |
| 25 help='The slave num of this CT run.') | |
| 26 args = parser.parse_args() | |
| 27 | |
| 28 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
| |
| 29 skps_dir = os.path.join( | |
| 30 _GetSkiaSrcDir(), 'content', 'test', 'ct', 'slave%s' % args.slave_num, | |
| 31 'skps') | |
| 32 resource_path = os.path.join(_GetSkiaSrcDir(), 'resources') | |
| 33 | |
| 34 # TODO(rmistry): Double check the below DM configuration with mtklein@. We | |
| 35 # need a basic configuration that can help catch bugs like the ones listed in | |
| 36 # skbug.com/4416 | |
| 37 cmd = [ | |
| 38 dm_path, | |
| 39 '--src', 'skp', | |
| 40 '--skps', skps_dir, | |
| 41 '--resourcePath', resource_path, | |
| 42 '--config', '8888', | |
| 43 '--verbose', | |
| 44 ] | |
| 45 return subprocess.call(cmd) | |
| 46 | |
| 47 | |
| 48 if __name__ == '__main__': | |
| 49 sys.exit(main()) | |
| OLD | NEW |