[Webkit-unassigned] [Bug 36504] Add a flag to run_webkit_tests to control saving crashing stacks
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 23 13:59:41 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=36504
--- Comment #2 from Dirk Pranke <dpranke at chromium.org> 2010-03-23 13:59:42 PST ---
(From update of attachment 51449)
> diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_shell_thread.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_shell_thread.py
> index de38dff..418b0c3 100644
> --- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_shell_thread.py
> +++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_shell_thread.py
> @@ -53,7 +53,7 @@ _log = logging.getLogger("webkitpy.layout_tests.layout_package."
>
> def process_output(port, test_info, test_types, test_args, target, output_dir,
> crash, timeout, test_run_time, actual_checksum,
> - output, error):
> + output, error, options):
> """Receives the output from a test_shell process, subjects it to a number
> of tests, and returns a list of failure types the test produced.
>
You should add a comment about the |options| variable into the docstring.
> @@ -82,13 +82,14 @@ def process_output(port, test_info, test_types, test_args, target, output_dir,
> failures.append(test_failures.FailureTimeout())
>
> if crash:
> - _log.debug("Stacktrace for %s:\n%s" % (test_info.filename, error))
> - # Strip off "file://" since RelativeTestFilename expects
> - # filesystem paths.
> - filename = os.path.join(output_dir, test_info.filename)
> - filename = os.path.splitext(filename)[0] + "-stack.txt"
> - port.maybe_make_directory(os.path.split(filename)[0])
> - open(filename, "wb").write(error)
> + _log.debug("Stacktrace for %s:\n%s" % (test_info.filename, error))
> + # Strip off "file://" since RelativeTestFilename expects
> + # filesystem paths.
> + if not options.nosave_crash_stack:
> + filename = os.path.join(output_dir, test_info.filename)
> + filename = os.path.splitext(filename)[0] + "-stack.txt"
> + port.maybe_make_directory(os.path.split(filename)[0])
> + open(filename, "wb").write(error)
move the "# Strip off "file://" comment inside the if block
> elif error:
> _log.debug("Previous test output extra lines after dump:\n%s" %
> error)
> @@ -129,7 +130,7 @@ class SingleTestThread(threading.Thread):
> """Thread wrapper for running a single test file."""
>
> def __init__(self, port, image_path, shell_args, test_info,
> - test_types, test_args, target, output_dir):
> + test_types, test_args, options):
> """
> Args:
> port: object implementing port-specific hooks
> @@ -146,7 +147,9 @@ class SingleTestThread(threading.Thread):
update the docstring
>
> def get_test_stats(self):
> @@ -364,8 +367,7 @@ class TestShellThread(threading.Thread):
> test_info,
> self._test_types,
> self._test_args,
> - self._options.target,
> - self._options.results_directory)
> + self._options)
>
update the docstring
> worker.start()
>
> @@ -422,7 +424,7 @@ class TestShellThread(threading.Thread):
> self._test_args, self._options.target,
> self._options.results_directory, crash,
> timeout, end - start, actual_checksum,
> - output, error)
> + output, error, self._options)
update the docstring
otherwise LGTM.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list