OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import collections | 7 import collections |
8 import json | 8 import json |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 '--build-properties=%s' % json.dumps(options.build_properties), | 44 '--build-properties=%s' % json.dumps(options.build_properties), |
45 '--slave-properties=%s' % json.dumps(slave_props)] | 45 '--slave-properties=%s' % json.dumps(slave_props)] |
46 | 46 |
47 commands = [] | 47 commands = [] |
48 if bot_config.bash_funs: | 48 if bot_config.bash_funs: |
49 bash_base = [ | 49 bash_base = [ |
50 '. build/android/buildbot/buildbot_functions.sh', | 50 '. build/android/buildbot/buildbot_functions.sh', |
51 "bb_baseline_setup %s '%s'" % | 51 "bb_baseline_setup %s '%s'" % |
52 (CHROME_SRC, "' '".join(property_args))] | 52 (CHROME_SRC, "' '".join(property_args))] |
53 commands.append(Command( | 53 commands.append(Command( |
54 None, ['bash', '-exc', ' && '.join(bash_base + bot_config.bash_funs)])) | 54 None, ['bash', '-exc', '; '.join(bash_base + bot_config.bash_funs)])) |
55 | 55 |
56 test_obj = bot_config.test_obj | 56 test_obj = bot_config.test_obj |
57 if test_obj: | 57 if test_obj: |
58 run_test_cmd = ['build/android/buildbot/bb_tests.py'] + property_args | 58 run_test_cmd = ['build/android/buildbot/bb_tests.py'] + property_args |
59 for test in test_obj.tests: | 59 for test in test_obj.tests: |
60 run_test_cmd.extend(['-f', test]) | 60 run_test_cmd.extend(['-f', test]) |
61 if test_obj.extra_args: | 61 if test_obj.extra_args: |
62 run_test_cmd.extend(test_obj.extra_args) | 62 run_test_cmd.extend(test_obj.extra_args) |
63 commands.append(Command('Run tests', run_test_cmd)) | 63 commands.append(Command('Run tests', run_test_cmd)) |
64 | 64 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 continue | 185 continue |
186 env = dict(os.environ) | 186 env = dict(os.environ) |
187 env['BUILDBOT_TESTING'] = '1' | 187 env['BUILDBOT_TESTING'] = '1' |
188 | 188 |
189 return_code |= subprocess.call(command, cwd=CHROME_SRC, env=env) | 189 return_code |= subprocess.call(command, cwd=CHROME_SRC, env=env) |
190 return return_code | 190 return return_code |
191 | 191 |
192 | 192 |
193 if __name__ == '__main__': | 193 if __name__ == '__main__': |
194 sys.exit(main(sys.argv)) | 194 sys.exit(main(sys.argv)) |
OLD | NEW |