##// 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 'jobs': ('HGTEST_JOBS', 1),
104 'jobs': ('HGTEST_JOBS', 1),
105 'timeout': ('HGTEST_TIMEOUT', 180),
105 'timeout': ('HGTEST_TIMEOUT', 180),
106 'port': ('HGTEST_PORT', 20059),
106 'port': ('HGTEST_PORT', 20059),
107 'shell': ('HGTEST_SHELL', '/bin/sh'),
107 }
108 }
108
109
109 def parseargs():
110 def parseargs():
@@ -149,6 +150,8 b' def parseargs():'
149 help="retest failed tests")
150 help="retest failed tests")
150 parser.add_option("-S", "--noskips", action="store_true",
151 parser.add_option("-S", "--noskips", action="store_true",
151 help="don't report skip tests verbosely")
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 parser.add_option("-t", "--timeout", type="int",
155 parser.add_option("-t", "--timeout", type="int",
153 help="kill errant tests after TIMEOUT seconds"
156 help="kill errant tests after TIMEOUT seconds"
154 " (default: $%s or %d)" % defaults['timeout'])
157 " (default: $%s or %d)" % defaults['timeout'])
@@ -177,6 +180,10 b' def parseargs():'
177 if 'java' in sys.platform or '__pypy__' in sys.modules:
180 if 'java' in sys.platform or '__pypy__' in sys.modules:
178 options.pure = True
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 if options.with_hg:
187 if options.with_hg:
181 if not (os.path.isfile(options.with_hg) and
188 if not (os.path.isfile(options.with_hg) and
182 os.access(options.with_hg, os.X_OK)):
189 os.access(options.with_hg, os.X_OK)):
@@ -527,7 +534,7 b' def tsttest(test, wd, options, replaceme'
527 os.write(fd, l)
534 os.write(fd, l)
528 os.close(fd)
535 os.close(fd)
529
536
530 cmd = '/bin/sh "%s"' % name
537 cmd = '"%s" "%s"' % (options.shell, name)
531 vlog("# Running", cmd)
538 vlog("# Running", cmd)
532 exitcode, output = run(cmd, wd, options, replacements)
539 exitcode, output = run(cmd, wd, options, replacements)
533 # do not merge output if skipped, return hghave message instead
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