Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(784)

Side by Side Diff: src/scripts/autotest

Issue 1627006: Filter out test directory which has only control files. (Closed)
Patch Set: patch 1 Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 if os.path.exists(board_blacklist_file): 143 if os.path.exists(board_blacklist_file):
144 blacklist = [line.strip() 144 blacklist = [line.strip()
145 for line in open(board_blacklist_file).readlines()] 145 for line in open(board_blacklist_file).readlines()]
146 else: 146 else:
147 blacklist = [] 147 blacklist = []
148 148
149 all_tests = 'compilebench,dbench,disktest,netperf2,ltp,unixbench' 149 all_tests = 'compilebench,dbench,disktest,netperf2,ltp,unixbench'
150 site_tests = '../third_party/autotest/files/client/site_tests' 150 site_tests = '../third_party/autotest/files/client/site_tests'
151 for site_test in os.listdir(site_tests): 151 for site_test in os.listdir(site_tests):
152 test_path = os.path.join(site_tests, site_test) 152 test_path = os.path.join(site_tests, site_test)
153 if (os.path.exists(test_path) and os.path.isdir(test_path) 153 test_py = os.path.join(test_path, '%s.py' % site_test)
154 and site_test not in blacklist): 154 if (os.path.exists(test_path) and os.path.isdir(test_path) and
155 os.path.exists(test_py) and os.path.isfile(test_py) and
156 site_test not in blacklist):
155 all_tests += ',' + site_test 157 all_tests += ',' + site_test
156 158
157 if 'all' == options.build.lower(): 159 if 'all' == options.build.lower():
158 if options.noprompt is not True: 160 if options.noprompt is not True:
159 print 'You want to pre-build all client tests and it may take a long', 161 print 'You want to pre-build all client tests and it may take a long',
160 print 'time to finish.' 162 print 'time to finish.'
161 print 'Are you sure you want to continue?(N/y)', 163 print 'Are you sure you want to continue?(N/y)',
162 answer = sys.stdin.readline() 164 answer = sys.stdin.readline()
163 if 'y' != answer[0].lower(): 165 if 'y' != answer[0].lower():
164 print 'Use --build to specify tests you like to pre-compile. ' 166 print 'Use --build to specify tests you like to pre-compile. '
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 else: 208 else:
207 ssh_key_file = os.path.join(os.path.dirname(me), 209 ssh_key_file = os.path.join(os.path.dirname(me),
208 'mod_for_test_scripts/ssh_keys/testing_rsa') 210 'mod_for_test_scripts/ssh_keys/testing_rsa')
209 os.chmod(ssh_key_file, 0400) 211 os.chmod(ssh_key_file, 0400)
210 run_autoserv(options.board, args) 212 run_autoserv(options.board, args)
211 213
212 214
213 if __name__ == '__main__': 215 if __name__ == '__main__':
214 main() 216 main()
215 217
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698