Bug 55694 - NRWT: AttributeError: TestRunner2 instance has no attribute '_cancel_workers
Summary: NRWT: AttributeError: TestRunner2 instance has no attribute '_cancel_workers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Mihai Parparita
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-03 11:49 PST by Mihai Parparita
Modified: 2011-03-03 14:19 PST (History)
3 users (show)

See Also:


Attachments
Patch (7.35 KB, patch)
2011-03-03 13:51 PST, Mihai Parparita
no flags Details | Formatted Diff | Diff
Patch (7.39 KB, patch)
2011-03-03 14:05 PST, Mihai Parparita
tony: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Parparita 2011-03-03 11:49:05 PST
I ran new-run-webkit-tests (no arguments, so with the mac port), and besides a bunch of unexpected DRT timeouts, the run ended with:

Aborting run since 20 crashes or timeouts were reached   
Traceback (most recent call last):
  File "/Users/mihaip/Developer/source/chromium1/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 439, in <module>
    sys.exit(main())
  File "/Users/mihaip/Developer/source/chromium1/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 434, in main
    return run(port_obj, options, args)
  File "/Users/mihaip/Developer/source/chromium1/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 120, in run
    num_unexpected_results = runner.run(result_summary)
  File "/Users/mihaip/Developer/source/chromium1/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py", line 666, in run
    self._run_tests(self._test_files_list, result_summary))
  File "/Users/mihaip/Developer/source/chromium1/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py", line 184, in _run_tests
    self._cancel_workers()
AttributeError: TestRunner2 instance has no attribute '_cancel_workers'
Comment 1 Mihai Parparita 2011-03-03 12:43:49 PST
I see that it's just a typo (it's cancel_workers now). I'll look into fixing this.
Comment 2 Mihai Parparita 2011-03-03 13:51:02 PST
Created attachment 84618 [details]
Patch
Comment 3 Mihai Parparita 2011-03-03 14:05:02 PST
Created attachment 84622 [details]
Patch

More correct re-raise in handle_exception
Comment 4 Mihai Parparita 2011-03-03 14:06:06 PST
The style bot is going to complain that:
Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py:213:  deprecated form of raising exception  [pep8/W602] [5]
However, the raise statement that I have is not the same as the one that's referred to in pep8:
- When raising an exception, use "raise ValueError('message')" instead of the older form "raise ValueError, 'message'".
Comment 5 WebKit Review Bot 2011-03-03 14:08:53 PST
Attachment 84622 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Tools/ChangeLog', u'Tools/Scripts/webkitpy..." exit_code: 1

Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py:213:  deprecated form of raising exception  [pep8/W602] [5]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Tony Chang 2011-03-03 14:11:52 PST
Comment on attachment 84622 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=84622&action=review

> Tools/ChangeLog:12
> +        - Fix ordering of returned arguments from TestRunner2._run_tests
> +          (interrupted and keyboard_interrupted were reversed)

This is one of the reasons why I prefer classes to tuples, although I guess it wouldn't have helped in this case (constructing the return object).
Comment 7 Mihai Parparita 2011-03-03 14:19:27 PST
Committed r80284: <http://trac.webkit.org/changeset/80284>