Reviewers: Benedikt Meurer,
Message:
Continuing my quest to make you happy. PTAL.
Description:
'make quickcheck': Assorted improvements.
'make ia32' should not build optdebug.
'make clean' should delete optdebug.
A single Ctrl+C press should terminate a 'make quickcheck' test run.
Please review this at https://codereview.chromium.org/106443002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+46, -39 lines):
M Makefile
M tools/run-tests.py
M tools/testrunner/local/commands.py
Index: Makefile
diff --git a/Makefile b/Makefile
index
910bcbd5894bd7324c050894ccf3baf854ed71fa..d2c9a9dfacb57fe7b76aeee26e6477d250afac52
100644
--- a/Makefile
+++ b/Makefile
@@ -273,7 +273,7 @@ mips mips.release mips.debug:
.SECONDEXPANSION:
$(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES))
-$(ARCHES): $(addprefix $$@.,$(MODES))
+$(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES))
# Defines how to build a particular target (e.g. ia32.release).
$(BUILDS): $(OUTDIR)/Makefile.$$@
@@ -368,6 +368,7 @@ $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES)
$(NACL_ARCHES)):
rm -f $(OUTDIR)/Makefile.$(basename $@)*
rm -rf $(OUTDIR)/$(basename $@).release
rm -rf $(OUTDIR)/$(basename $@).debug
+ rm -rf $(OUTDIR)/$(basename $@).optdebug
find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete
native.clean:
Index: tools/run-tests.py
diff --git a/tools/run-tests.py b/tools/run-tests.py
index
28926e56aa886d3c5fcd4e86deb98cf01caed4f1..15c42d0379fa8f750c6044abde92bf91eb4d547d
100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -329,7 +329,10 @@ def Main():
s.DownloadData()
for (arch, mode) in options.arch_and_mode:
- code = Execute(arch, mode, args, options, suites, workspace)
+ try:
+ code = Execute(arch, mode, args, options, suites, workspace)
+ except KeyboardInterrupt:
+ return 2
exit_code = exit_code or code
return exit_code
@@ -449,7 +452,7 @@ def Execute(arch, mode, args, options, suites,
workspace):
return exit_code
overall_duration = time.time() - start_time
except KeyboardInterrupt:
- return 1
+ raise
if options.time:
verbose.PrintTestDurations(suites, overall_duration)
Index: tools/testrunner/local/commands.py
diff --git a/tools/testrunner/local/commands.py
b/tools/testrunner/local/commands.py
index
01f170dc872d1bec543cf910a4d032553ef89df5..4f3dc51e02b20d763e80adb3d65c9e8433ebd21d
100644
--- a/tools/testrunner/local/commands.py
+++ b/tools/testrunner/local/commands.py
@@ -64,34 +64,34 @@ def Win32SetErrorMode(mode):
def RunProcess(verbose, timeout, args, **rest):
- if verbose: print "#", " ".join(args)
- popen_args = args
- prev_error_mode = SEM_INVALID_VALUE
- if utils.IsWindows():
- popen_args = subprocess.list2cmdline(args)
- # Try to change the error mode to avoid dialogs on fatal errors. Don't
- # touch any existing error mode flags by merging the existing error
mode.
- # See http://blogs.msdn.com/oldnewthing/archive/2004/07/27/198410.aspx.
- error_mode = SEM_NOGPFAULTERRORBOX
- prev_error_mode = Win32SetErrorMode(error_mode)
- Win32SetErrorMode(error_mode | prev_error_mode)
- process = subprocess.Popen(
- shell=utils.IsWindows(),
- args=popen_args,
- **rest
- )
- if (utils.IsWindows() and prev_error_mode != SEM_INVALID_VALUE):
- Win32SetErrorMode(prev_error_mode)
- # Compute the end time - if the process crosses this limit we
- # consider it timed out.
- if timeout is None: end_time = None
- else: end_time = time.time() + timeout
- timed_out = False
- # Repeatedly check the exit code from the process in a
- # loop and keep track of whether or not it times out.
- exit_code = None
- sleep_time = INITIAL_SLEEP_TIME
try:
+ if verbose: print "#", " ".join(args)
+ popen_args = args
+ prev_error_mode = SEM_INVALID_VALUE
+ if utils.IsWindows():
+ popen_args = subprocess.list2cmdline(args)
+ # Try to change the error mode to avoid dialogs on fatal errors.
Don't
+ # touch any existing error mode flags by merging the existing error
mode.
+ # See
http://blogs.msdn.com/oldnewthing/archive/2004/07/27/198410.aspx.
+ error_mode = SEM_NOGPFAULTERRORBOX
+ prev_error_mode = Win32SetErrorMode(error_mode)
+ Win32SetErrorMode(error_mode | prev_error_mode)
+ process = subprocess.Popen(
+ shell=utils.IsWindows(),
+ args=popen_args,
+ **rest
+ )
+ if (utils.IsWindows() and prev_error_mode != SEM_INVALID_VALUE):
+ Win32SetErrorMode(prev_error_mode)
+ # Compute the end time - if the process crosses this limit we
+ # consider it timed out.
+ if timeout is None: end_time = None
+ else: end_time = time.time() + timeout
+ timed_out = False
+ # Repeatedly check the exit code from the process in a
+ # loop and keep track of whether or not it times out.
+ exit_code = None
+ sleep_time = INITIAL_SLEEP_TIME
while exit_code is None:
if (not end_time is None) and (time.time() >= end_time):
# Kill the process and wait for it to exit.
@@ -131,10 +131,10 @@ def CheckedUnlink(name):
def Execute(args, verbose=False, timeout=None):
- args = [ c for c in args if c != "" ]
- (fd_out, outname) = tempfile.mkstemp()
- (fd_err, errname) = tempfile.mkstemp()
try:
+ args = [ c for c in args if c != "" ]
+ (fd_out, outname) = tempfile.mkstemp()
+ (fd_err, errname) = tempfile.mkstemp()
(exit_code, timed_out) = RunProcess(
verbose,
timeout,
@@ -142,12 +142,15 @@ def Execute(args, verbose=False, timeout=None):
stdout=fd_out,
stderr=fd_err
)
+ except KeyboardInterrupt:
+ raise
except:
raise
- os.close(fd_out)
- os.close(fd_err)
- out = file(outname).read()
- errors = file(errname).read()
- CheckedUnlink(outname)
- CheckedUnlink(errname)
+ finally:
+ os.close(fd_out)
+ os.close(fd_err)
+ out = file(outname).read()
+ errors = file(errname).read()
+ CheckedUnlink(outname)
+ CheckedUnlink(errname)
return output.Output(exit_code, timed_out, out, errors)
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.