##// END OF EJS Templates
run-tests: add --shell command line flag...
Martin Geisler -
r14202:b68a4142 default
parent child Browse files
Show More
@@ -104,6 +104,7 b' defaults = {'
104 104 'jobs': ('HGTEST_JOBS', 1),
105 105 'timeout': ('HGTEST_TIMEOUT', 180),
106 106 'port': ('HGTEST_PORT', 20059),
107 'shell': ('HGTEST_SHELL', '/bin/sh'),
107 108 }
108 109
109 110 def parseargs():
@@ -149,6 +150,8 b' def parseargs():'
149 150 help="retest failed tests")
150 151 parser.add_option("-S", "--noskips", action="store_true",
151 152 help="don't report skip tests verbosely")
153 parser.add_option("--shell", type="string",
154 help="shell to use (default: $%s or %s)" % defaults['shell'])
152 155 parser.add_option("-t", "--timeout", type="int",
153 156 help="kill errant tests after TIMEOUT seconds"
154 157 " (default: $%s or %d)" % defaults['timeout'])
@@ -177,6 +180,10 b' def parseargs():'
177 180 if 'java' in sys.platform or '__pypy__' in sys.modules:
178 181 options.pure = True
179 182
183 if not (os.path.isfile(options.shell) and
184 os.access(options.shell, os.X_OK)):
185 parser.error('--shell must be executable')
186
180 187 if options.with_hg:
181 188 if not (os.path.isfile(options.with_hg) and
182 189 os.access(options.with_hg, os.X_OK)):
@@ -527,7 +534,7 b' def tsttest(test, wd, options, replaceme'
527 534 os.write(fd, l)
528 535 os.close(fd)
529 536
530 cmd = '/bin/sh "%s"' % name
537 cmd = '"%s" "%s"' % (options.shell, name)
531 538 vlog("# Running", cmd)
532 539 exitcode, output = run(cmd, wd, options, replacements)
533 540 # do not merge output if skipped, return hghave message instead
General Comments 0
You need to be logged in to leave comments. Login now