Bug 64472 - WIN: NRWT runs compositing tests on configurations that don't support compositing
Summary: WIN: NRWT runs compositing tests on configurations that don't support composi...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Eric Seidel (no email)
Depends on:
Blocks: 38756
  Show dependency treegraph
Reported: 2011-07-13 11:24 PDT by Adam Roben (:aroben)
Modified: 2011-08-11 12:53 PDT (History)
5 users (show)

See Also:

Patch (4.51 KB, patch)
2011-08-10 11:03 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2011-07-13 11:24:42 PDT
old-run-webkit-tests has code to detect when accelerated compositing is supported, and skips various tests if it is not supported. new-run-webkit-tests needs to do this too.
Comment 1 Adam Roben (:aroben) 2011-07-13 12:41:34 PDT
The relevant code in ORWT is here: <http://trac.webkit.org/browser/trunk/Tools/Scripts/old-run-webkit-tests?rev=90125#L544>.
Comment 2 Eric Seidel (no email) 2011-07-13 13:03:47 PDT
Thank you for the report.  Should be very easy to fix.
Comment 3 Eric Seidel (no email) 2011-07-13 15:27:03 PDT
The support is all written, but it must be broken somehow.
Someone with python familiarity and a windows build of webkit should be able to debug this.  I don't have a windows build handy. :(

Comment 4 Dirk Pranke 2011-07-13 15:36:48 PDT
I will take a look. In theory, you should be able to verify this with --platform mock-win and not need the build around.
Comment 5 Dirk Pranke 2011-07-13 15:50:05 PDT
(In reply to comment #4)
> I will take a look. In theory, you should be able to verify this with --platform mock-win and not need the build around.

Er, scratch that, obviously it won't work for feature detection.
Comment 6 Eric Seidel (no email) 2011-08-10 10:45:06 PDT
If someone with a windows box could tell me what DRT output looks like I can easily unittest (and hopefully fix) this code without needing to set up a windows machine:

Basically I just need the output from:

./DumpRenderTree --print-supported-features 2>&1

It would be nice to know if --print-supported-features is actually writing to stderr, because I'd like to get rid of the 2>&1 nonsense if possible. :)
Comment 7 Eric Seidel (no email) 2011-08-10 10:45:42 PDT
It looks like it does not print to stderr:

    if (printSupportedFeatures) {
        BOOL acceleratedCompositingAvailable;

        // In theory, we could have a software-based 3D rendering implementation that we use when
        // hardware-acceleration is not available. But we don't have any such software
        // implementation, so 3D rendering is only available when hardware-acceleration is.
        BOOL threeDRenderingAvailable = acceleratedCompositingAvailable;
        BOOL threeDRenderingAvailable = FALSE;

        printf("SupportedFeatures:%s %s\n", acceleratedCompositingAvailable ? "AcceleratedCompositing" : "", threeDRenderingAvailable ? "3DRendering" : "");
        return 0;
Comment 8 Eric Seidel (no email) 2011-08-10 11:03:53 PDT
Created attachment 103507 [details]
Comment 9 Adam Barth 2011-08-10 11:09:47 PDT
Comment on attachment 103507 [details]

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

> Tools/Scripts/webkitpy/layout_tests/port/webkit.py:232
> +        supported_features_command = [self._path_to_driver(), '--print-supported-features']
> +        output = self._executive.run_command(supported_features_command)

I would just merge these lines.
Comment 10 WebKit Review Bot 2011-08-10 12:35:15 PDT
Comment on attachment 103507 [details]

Clearing flags on attachment: 103507

Committed r92784: <http://trac.webkit.org/changeset/92784>
Comment 11 WebKit Review Bot 2011-08-10 12:35:20 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Ryosuke Niwa 2011-08-10 17:26:29 PDT
This patch broke nrwt on Snow Leopard :(

It's completely blocking my work at the moment.
Comment 13 Ryosuke Niwa 2011-08-10 17:28:11 PDT
When I run it locally, I get the following error:

Traceback (most recent call last):
  File "/Volumes/Data/webkit3/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 436, in <module>
  File "/Volumes/Data/webkit3/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 431, in main
    return run(port, options, args)
  File "/Volumes/Data/webkit3/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 98, in run
  File "/Volumes/Data/webkit3/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 375, in parse_expectations
  File "/Volumes/Data/webkit3/Tools/Scripts/webkitpy/layout_tests/port/webkit.py", line 327, in test_expectations
    expectations = self._skipped_list_as_expectations()
  File "/Volumes/Data/webkit3/Tools/Scripts/webkitpy/layout_tests/port/webkit.py", line 343, in _skipped_list_as_expectations
    tests_to_skip = self.skipped_layout_tests()
  File "/Volumes/Data/webkit3/Tools/Scripts/webkitpy/layout_tests/port/webkit.py", line 351, in skipped_layout_tests
  File "/Volumes/Data/webkit3/Tools/Scripts/webkitpy/layout_tests/port/webkit.py", line 274, in _skipped_tests_for_unsupported_features
    feature_list = self._runtime_feature_list()
  File "/Volumes/Data/webkit3/Tools/Scripts/webkitpy/layout_tests/port/webkit.py", line 232, in _runtime_feature_list
    output = self._executive.run_command(supported_features_command)
  File "/Volumes/Data/webkit3/Tools/Scripts/webkitpy/common/system/executive.py", line 441, in run_command
    (error_handler or self.default_error_handler)(script_error)
  File "/Volumes/Data/webkit3/Tools/Scripts/webkitpy/common/system/executive.py", line 358, in default_error_handler
    raise error
webkitpy.common.system.executive.ScriptError: Failed to run "[u'/Volumes/Data/webkit3/WebKitBuild/Debug/DumpRenderTree', u'--print-supported-features']" exit_code: 1
Comment 14 Ryosuke Niwa 2011-08-10 17:48:57 PDT
It appears that the regression has been fixed.
Comment 15 Eric Seidel (no email) 2011-08-11 12:53:38 PDT
Yup.  Thank you for the report.