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

Side by Side Diff: client/bin/autotest

Issue 1317002: Continue to refactor autoserv to build client test at run time. (Closed)
Patch Set: path 18 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 | client/bin/base_utils.py » ('j') | 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 -u 1 #!/usr/bin/python -u
2 # 2 #
3 # autotest <control file> - run the autotest control file specified. 3 # autotest <control file> - run the autotest control file specified.
4 # 4 #
5 import os, sys 5 import os, sys
6 import common 6 import common
7 from optparse import OptionParser 7 from optparse import OptionParser
8 from autotest_lib.client.bin import job 8 from autotest_lib.client.bin import job
9 from autotest_lib.client.common_lib import global_config 9 from autotest_lib.client.common_lib import global_config
10 10
11 11
12 # Use the name of the binary to find the real installation directory 12 # Use the name of the binary to find the real installation directory
13 # aka $AUTODIR. Update our path to include the $AUTODIR/bin/tests 13 # aka $AUTODIR. Update our path to include the $AUTODIR/bin/tests
14 # directory and ensure we have $AUTODIR in our environment. 14 # directory and ensure we have $AUTODIR in our environment.
15 autodirbin = os.path.dirname(os.path.realpath(sys.argv[0])) 15 autodirbin = os.path.dirname(os.path.realpath(sys.argv[0]))
16 autodir = os.path.dirname(autodirbin) 16 autodir = os.path.dirname(autodirbin)
17 17
18 ##print 'AUTODIRBIN: ' + autodirbin
19 ##print 'AUTODIR: ' + autodir
20
21 sys.path.insert(0, autodirbin) 18 sys.path.insert(0, autodirbin)
22 19
23 os.environ['AUTODIR'] = autodir 20 os.environ['AUTODIR'] = autodir
24 os.environ['AUTODIRBIN'] = autodirbin 21 os.environ['AUTODIRBIN'] = autodirbin
25 os.environ['PYTHONPATH'] = autodirbin 22 os.environ['PYTHONPATH'] = autodirbin
26 23
27 parser = OptionParser() 24 parser = OptionParser()
28 25
29 parser.add_option("-c", "--continue", dest="cont", action="store_true", 26 parser.add_option("-c", "--continue", dest="cont", action="store_true",
30 default=False, help="continue previously started job") 27 default=False, help="continue previously started job")
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 from autotest_lib.client.bin import setup_job 72 from autotest_lib.client.bin import setup_job
76 exit_code = 0 73 exit_code = 0
77 try: 74 try:
78 setup_job.setup_tests(options) 75 setup_job.setup_tests(options)
79 except: 76 except:
80 exit_code = 1 77 exit_code = 1
81 sys.exit(exit_code) 78 sys.exit(exit_code)
82 79
83 # JOB: run the specified job control file. 80 # JOB: run the specified job control file.
84 job.runjob(os.path.realpath(args[0]), drop_caches, options) 81 job.runjob(os.path.realpath(args[0]), drop_caches, options)
OLDNEW
« no previous file with comments | « no previous file | client/bin/base_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698