36 help="exit on the first test failure") |
36 help="exit on the first test failure") |
37 parser.add_option("-i", "--interactive", action="store_true", |
37 parser.add_option("-i", "--interactive", action="store_true", |
38 help="prompt to accept changed output") |
38 help="prompt to accept changed output") |
39 parser.add_option("-j", "--jobs", type="int", |
39 parser.add_option("-j", "--jobs", type="int", |
40 help="number of jobs to run in parallel") |
40 help="number of jobs to run in parallel") |
|
41 parser.add_option("--keep-tmpdir", action="store_true", |
|
42 help="keep temporary directory after running tests (best used with --tmpdir)") |
41 parser.add_option("-R", "--restart", action="store_true", |
43 parser.add_option("-R", "--restart", action="store_true", |
42 help="restart at last error") |
44 help="restart at last error") |
43 parser.add_option("-p", "--port", type="int", |
45 parser.add_option("-p", "--port", type="int", |
44 help="port on which servers should listen") |
46 help="port on which servers should listen") |
45 parser.add_option("-r", "--retest", action="store_true", |
47 parser.add_option("-r", "--retest", action="store_true", |
131 vlog("# Found prerequisite", p, "at", found) |
133 vlog("# Found prerequisite", p, "at", found) |
132 else: |
134 else: |
133 print "WARNING: Did not find prerequisite tool: "+p |
135 print "WARNING: Did not find prerequisite tool: "+p |
134 |
136 |
135 def cleanup_exit(): |
137 def cleanup_exit(): |
136 if verbose: |
138 if not options.keep_tmpdir: |
137 print "# Cleaning up HGTMP", HGTMP |
139 if verbose: |
138 shutil.rmtree(HGTMP, True) |
140 print "# Cleaning up HGTMP", HGTMP |
|
141 shutil.rmtree(HGTMP, True) |
139 |
142 |
140 def use_correct_python(): |
143 def use_correct_python(): |
141 # some tests run python interpreter. they must use same |
144 # some tests run python interpreter. they must use same |
142 # interpreter we use or bad things will happen. |
145 # interpreter we use or bad things will happen. |
143 exedir, exename = os.path.split(sys.executable) |
146 exedir, exename = os.path.split(sys.executable) |