Commit 9f4eced3 authored by ager@chromium.org's avatar ager@chromium.org
parent 2fcad0ae
...@@ -479,7 +479,7 @@ def Execute(args, context, timeout=None): ...@@ -479,7 +479,7 @@ def Execute(args, context, timeout=None):
try: try:
os.unlink(name) os.unlink(name)
except OSError, e: except OSError, e:
PrintError(str(e)) PrintError("os.unlink() " + str(e))
CheckedUnlink(outname) CheckedUnlink(outname)
CheckedUnlink(errname) CheckedUnlink(errname)
return CommandOutput(exit_code, timed_out, output, errors) return CommandOutput(exit_code, timed_out, output, errors)
...@@ -590,7 +590,7 @@ class LiteralTestSuite(TestSuite): ...@@ -590,7 +590,7 @@ class LiteralTestSuite(TestSuite):
test.GetTestStatus(context, sections, defs) test.GetTestStatus(context, sections, defs)
PREFIX = {'debug': '_g', 'release': ''} SUFFIX = {'debug': '_g', 'release': ''}
class Context(object): class Context(object):
...@@ -605,11 +605,10 @@ class Context(object): ...@@ -605,11 +605,10 @@ class Context(object):
self.suppress_dialogs = suppress_dialogs self.suppress_dialogs = suppress_dialogs
def GetVm(self, mode): def GetVm(self, mode):
name = self.vm_root + PREFIX[mode] name = self.vm_root + SUFFIX[mode]
if utils.IsWindows(): if utils.IsWindows() and not name.endswith('.exe'):
return name + '.exe' name = name + '.exe'
else: return name
return name
def RunTestCases(all_cases, progress, tasks): def RunTestCases(all_cases, progress, tasks):
def DoSkip(case): def DoSkip(case):
...@@ -1092,6 +1091,7 @@ def BuildOptions(): ...@@ -1092,6 +1091,7 @@ def BuildOptions():
dest="suppress_dialogs", default=True, action="store_true") dest="suppress_dialogs", default=True, action="store_true")
result.add_option("--no-suppress-dialogs", help="Display Windows dialogs for crashing tests", result.add_option("--no-suppress-dialogs", help="Display Windows dialogs for crashing tests",
dest="suppress_dialogs", action="store_false") dest="suppress_dialogs", action="store_false")
result.add_option("--shell", help="Path to V8 shell", default="shell");
return result return result
...@@ -1222,21 +1222,22 @@ def Main(): ...@@ -1222,21 +1222,22 @@ def Main():
run_valgrind = join(workspace, "tools", "run-valgrind.py") run_valgrind = join(workspace, "tools", "run-valgrind.py")
options.special_command = "python -u " + run_valgrind + " @" options.special_command = "python -u " + run_valgrind + " @"
# First build the required targets shell = abspath(options.shell)
buildspace = abspath('.') buildspace = dirname(shell)
context = Context(workspace, buildspace, VERBOSE, context = Context(workspace, buildspace, VERBOSE,
join(buildspace, 'shell'), shell,
options.timeout, options.timeout,
GetSpecialCommandProcessor(options.special_command), GetSpecialCommandProcessor(options.special_command),
options.suppress_dialogs) options.suppress_dialogs)
if options.j != 1: # First build the required targets
options.scons_flags += ['-j', str(options.j)]
if not options.no_build: if not options.no_build:
reqs = [ ] reqs = [ ]
for path in paths: for path in paths:
reqs += root.GetBuildRequirements(path, context) reqs += root.GetBuildRequirements(path, context)
reqs = list(set(reqs)) reqs = list(set(reqs))
if len(reqs) > 0: if len(reqs) > 0:
if options.j != 1:
options.scons_flags += ['-j', str(options.j)]
if not BuildRequirements(context, reqs, options.mode, options.scons_flags): if not BuildRequirements(context, reqs, options.mode, options.scons_flags):
return 1 return 1
...@@ -1253,6 +1254,9 @@ def Main(): ...@@ -1253,6 +1254,9 @@ def Main():
globally_unused_rules = None globally_unused_rules = None
for path in paths: for path in paths:
for mode in options.mode: for mode in options.mode:
if not exists(context.GetVm(mode)):
print "Can't find shell executable: '%s'" % context.GetVm(mode)
continue
env = { env = {
'mode': mode, 'mode': mode,
'system': utils.GuessOS(), 'system': utils.GuessOS(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment