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 copy | 8 import copy |
9 import json | 9 import json |
10 import os | 10 import os |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 Returns: | 97 Returns: |
98 list of Command objects. | 98 list of Command objects. |
99 """ | 99 """ |
100 property_args = bb_utils.EncodeProperties(options) | 100 property_args = bb_utils.EncodeProperties(options) |
101 commands = [[bot_config.host_obj.script, | 101 commands = [[bot_config.host_obj.script, |
102 '--steps=%s' % ','.join(bot_config.host_obj.host_steps)] + | 102 '--steps=%s' % ','.join(bot_config.host_obj.host_steps)] + |
103 property_args + (bot_config.host_obj.extra_args or [])] | 103 property_args + (bot_config.host_obj.extra_args or [])] |
104 | 104 |
105 test_obj = bot_config.test_obj | 105 test_obj = bot_config.test_obj |
106 if test_obj: | 106 if test_obj: |
107 run_test_cmd = [test_obj.script, '--reboot'] + property_args | 107 run_test_cmd = [test_obj.script] + property_args |
108 for test in test_obj.tests: | 108 for test in test_obj.tests: |
109 run_test_cmd.extend(['-f', test]) | 109 run_test_cmd.extend(['-f', test]) |
110 if test_obj.extra_args: | 110 if test_obj.extra_args: |
111 run_test_cmd.extend(test_obj.extra_args) | 111 run_test_cmd.extend(test_obj.extra_args) |
112 commands.append(run_test_cmd) | 112 commands.append(run_test_cmd) |
113 return commands | 113 return commands |
114 | 114 |
115 | 115 |
116 def GetBotStepMap(): | 116 def GetBotStepMap(): |
117 compile_step = ['compile'] | 117 compile_step = ['compile'] |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 for command in commands: | 283 for command in commands: |
284 print 'Will run: ', bb_utils.CommandToString(command) | 284 print 'Will run: ', bb_utils.CommandToString(command) |
285 print | 285 print |
286 | 286 |
287 env = GetEnvironment(bot_config.host_obj, options.testing) | 287 env = GetEnvironment(bot_config.host_obj, options.testing) |
288 return RunBotCommands(options, commands, env) | 288 return RunBotCommands(options, commands, env) |
289 | 289 |
290 | 290 |
291 if __name__ == '__main__': | 291 if __name__ == '__main__': |
292 sys.exit(main(sys.argv)) | 292 sys.exit(main(sys.argv)) |
OLD | NEW |