| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS 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 # A python wrapper to call autotest ebuild. | 7 # A python wrapper to call autotest ebuild. |
| 8 | 8 |
| 9 import commands, logging, optparse, os, subprocess, sys | 9 import commands, logging, optparse, os, subprocess, sys |
| 10 | 10 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 use_flag = use_flag + ' buildcheck' | 148 use_flag = use_flag + ' buildcheck' |
| 149 | 149 |
| 150 board_blacklist_file = ('%s/src/overlays/overlay-%s/autotest-blacklist' % | 150 board_blacklist_file = ('%s/src/overlays/overlay-%s/autotest-blacklist' % |
| 151 (os.environ['GCLIENT_ROOT'], options.board)) | 151 (os.environ['GCLIENT_ROOT'], options.board)) |
| 152 if os.path.exists(board_blacklist_file): | 152 if os.path.exists(board_blacklist_file): |
| 153 blacklist = [line.strip() | 153 blacklist = [line.strip() |
| 154 for line in open(board_blacklist_file).readlines()] | 154 for line in open(board_blacklist_file).readlines()] |
| 155 else: | 155 else: |
| 156 blacklist = [] | 156 blacklist = [] |
| 157 | 157 |
| 158 all_tests = ('compilebench,dbench,disktest,fsx,hackbench,iperf,ltp,netperf2,' | 158 all_tests = ('compilebench,dbench,disktest,fsx,hackbench,iperf,netperf2,' |
| 159 'netpipe,unixbench') | 159 'netpipe,unixbench') |
| 160 site_tests = '../third_party/autotest/files/client/site_tests' | 160 site_tests = '../third_party/autotest/files/client/site_tests' |
| 161 for site_test in os.listdir(site_tests): | 161 for site_test in os.listdir(site_tests): |
| 162 test_path = os.path.join(site_tests, site_test) | 162 test_path = os.path.join(site_tests, site_test) |
| 163 test_py = os.path.join(test_path, '%s.py' % site_test) | 163 test_py = os.path.join(test_path, '%s.py' % site_test) |
| 164 if (os.path.exists(test_path) and os.path.isdir(test_path) and | 164 if (os.path.exists(test_path) and os.path.isdir(test_path) and |
| 165 os.path.exists(test_py) and os.path.isfile(test_py) and | 165 os.path.exists(test_py) and os.path.isfile(test_py) and |
| 166 site_test not in blacklist): | 166 site_test not in blacklist): |
| 167 all_tests += ',' + site_test | 167 all_tests += ',' + site_test |
| 168 | 168 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 die(common_sh, 'build_autotest failed.') | 223 die(common_sh, 'build_autotest failed.') |
| 224 else: | 224 else: |
| 225 ssh_key_file = os.path.join(os.path.dirname(me), | 225 ssh_key_file = os.path.join(os.path.dirname(me), |
| 226 'mod_for_test_scripts/ssh_keys/testing_rsa') | 226 'mod_for_test_scripts/ssh_keys/testing_rsa') |
| 227 os.chmod(ssh_key_file, 0400) | 227 os.chmod(ssh_key_file, 0400) |
| 228 run_autoserv(options, args) | 228 run_autoserv(options, args) |
| 229 | 229 |
| 230 | 230 |
| 231 if __name__ == '__main__': | 231 if __name__ == '__main__': |
| 232 main() | 232 main() |
| OLD | NEW |