⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245733 in webkit


Ignore:
Timestamp:
May 23, 2019, 7:27:22 PM (7 years ago)
Author:
Fujii Hironori
Message:

run-webkit-tests: Remove feature detection support
https://bugs.webkit.org/show_bug.cgi?id=198105

Reviewed by Jonathan Bedard.

Tools:

Feature detection support was added to DRT for Windows and old
run-webkit-tests in Bug 35610. It was added for NRWT in Bug 41842.
But, it doesn't work for DRT for Windows because of feature name
mismatches. Since USE(ACCELERATED_COMPOSITING) flag has been
removed in Bug 127833, it is not needed anymore.

  • DumpRenderTree/win/DumpRenderTree.cpp:

(main):

  • Scripts/webkitpy/port/base.py:

(Port._tests_for_other_platforms):
(Port._skipped_tests_for_unsupported_features):
(Port._runtime_feature_list): Deleted.
(Port.nm_command): Deleted.
(Port._modules_to_search_for_symbols): Deleted.
(Port._symbols_string): Deleted.
(Port._missing_feature_to_skipped_tests): Deleted.
(Port._has_test_in_directories): Deleted.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort.make_command):
(DarwinPort.nm_command): Deleted.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.reset_preferences):
(IOSSimulatorPort.nm_command): Deleted.

  • Scripts/webkitpy/port/port_testcase.py:

(TestWebKitPort.init):
(TestWebKitPort.all_test_configurations):
(PortTestCase.test_path_to_test_expectations_file):
(TestWebKitPort._symbols_string): Deleted.
(PortTestCase.test_skipped_directories_for_features): Deleted.
(PortTestCase.test_skipped_directories_for_features_no_matching_tests_in_test_list): Deleted.
(PortTestCase.test_skipped_tests_for_unsupported_features_empty_test_list): Deleted.

  • Scripts/webkitpy/port/watch_simulator.py:

(WatchSimulatorPort.reset_preferences):
(WatchSimulatorPort.nm_command): Deleted.

  • Scripts/webkitpy/port/win.py:

(WinPort.show_results_html_file):
(WinPort._runtime_feature_list): Deleted.

  • Scripts/webkitpy/port/win_unittest.py:

(WinPortTest.test_operating_system):
(WinPortTest.test_runtime_feature_list): Deleted.

  • WebKitTestRunner/Options.cpp:

(WTR::OptionsHandler::OptionsHandler):
(WTR::handleOptionPrintSupportedFeatures): Deleted.

  • WebKitTestRunner/Options.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::initialize):

LayoutTests:

  • platform/win/TestExpectations:
  • platform/wincairo/TestExpectations:

Added Skip for all compositing, animations/3d and transforms/3d tests temporarily.

Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r245721 r245733  
     12019-05-23  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        run-webkit-tests: Remove feature detection support
     4        https://bugs.webkit.org/show_bug.cgi?id=198105
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        * platform/win/TestExpectations:
     9        * platform/wincairo/TestExpectations:
     10        Added Skip for all compositing, animations/3d and transforms/3d tests temporarily.
     11
    1122019-05-23  Saam barati  <sbarati@apple.com>
    213
  • trunk/LayoutTests/platform/win/TestExpectations

    r245672 r245733  
    26022602################################################################################
    26032603
     2604compositing [ Skip ]
     2605animations/3d [ Skip ]
     2606transforms/3d [ Skip ]
     2607
    26042608# Skip tests that fail only in Debug mode
    2605 [ Debug ] compositing [ Skip ]
    26062609[ Debug ] legacy-animation-engine/compositing [ Skip ]
    2607 [ Debug ] transforms/3d/hit-testing [ Skip ]
    2608 [ Debug ] transforms/3d/point-mapping [ Skip ]
    26092610
    26102611# These failures all seem to be related to the page cache being in a bad state.
     
    26942695[ Debug ] platform/win/fast/events/panScroll-no-iframe-jump.html [ Skip ] # Causes later tests to fail
    26952696[ Debug ] svg/custom/list-items-with-svg-font-family.html [ Skip ] # Causes later tests to fail
    2696 [ Debug ] transforms/3d/general/perspective-non-layer.html [ Failure ]
    26972697
    26982698# These don't seem to be running.
  • trunk/LayoutTests/platform/wincairo/TestExpectations

    r245321 r245733  
    15031503#//////////////////////////////////////////////////////////////////////////////////////////
    15041504
     1505animations/3d [ Skip ]
     1506compositing [ Skip ]
    15051507fast/attachment [ Skip ]
    15061508fast/backgrounds [ Skip ]
  • trunk/Tools/ChangeLog

    r245729 r245733  
     12019-05-23  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        run-webkit-tests: Remove feature detection support
     4        https://bugs.webkit.org/show_bug.cgi?id=198105
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        Feature detection support was added to DRT for Windows and old
     9        run-webkit-tests in Bug 35610. It was added for NRWT in Bug 41842.
     10        But, it doesn't work for DRT for Windows because of feature name
     11        mismatches. Since USE(ACCELERATED_COMPOSITING) flag has been
     12        removed in Bug 127833, it is not needed anymore.
     13
     14        * DumpRenderTree/win/DumpRenderTree.cpp:
     15        (main):
     16        * Scripts/webkitpy/port/base.py:
     17        (Port._tests_for_other_platforms):
     18        (Port._skipped_tests_for_unsupported_features):
     19        (Port._runtime_feature_list): Deleted.
     20        (Port.nm_command): Deleted.
     21        (Port._modules_to_search_for_symbols): Deleted.
     22        (Port._symbols_string): Deleted.
     23        (Port._missing_feature_to_skipped_tests): Deleted.
     24        (Port._has_test_in_directories): Deleted.
     25        * Scripts/webkitpy/port/darwin.py:
     26        (DarwinPort.make_command):
     27        (DarwinPort.nm_command): Deleted.
     28        * Scripts/webkitpy/port/ios_simulator.py:
     29        (IOSSimulatorPort.reset_preferences):
     30        (IOSSimulatorPort.nm_command): Deleted.
     31        * Scripts/webkitpy/port/port_testcase.py:
     32        (TestWebKitPort.__init__):
     33        (TestWebKitPort.all_test_configurations):
     34        (PortTestCase.test_path_to_test_expectations_file):
     35        (TestWebKitPort._symbols_string): Deleted.
     36        (PortTestCase.test_skipped_directories_for_features): Deleted.
     37        (PortTestCase.test_skipped_directories_for_features_no_matching_tests_in_test_list): Deleted.
     38        (PortTestCase.test_skipped_tests_for_unsupported_features_empty_test_list): Deleted.
     39        * Scripts/webkitpy/port/watch_simulator.py:
     40        (WatchSimulatorPort.reset_preferences):
     41        (WatchSimulatorPort.nm_command): Deleted.
     42        * Scripts/webkitpy/port/win.py:
     43        (WinPort.show_results_html_file):
     44        (WinPort._runtime_feature_list): Deleted.
     45        * Scripts/webkitpy/port/win_unittest.py:
     46        (WinPortTest.test_operating_system):
     47        (WinPortTest.test_runtime_feature_list): Deleted.
     48        * WebKitTestRunner/Options.cpp:
     49        (WTR::OptionsHandler::OptionsHandler):
     50        (WTR::handleOptionPrintSupportedFeatures): Deleted.
     51        * WebKitTestRunner/Options.h:
     52        * WebKitTestRunner/TestController.cpp:
     53        (WTR::TestController::initialize):
     54
    1552019-05-23  Commit Queue  <commit-queue@webkit.org>
    256
  • trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp

    r244599 r245733  
    105105static bool printSeparators = false;
    106106static bool leakChecking = false;
    107 static bool printSupportedFeatures = false;
    108107static bool showWebView = false;
    109108static RetainPtr<CFStringRef> persistentUserStyleSheetLocation;
     
    14661465        }
    14671466
    1468         if (!stricmp(argv[i], "--print-supported-features")) {
    1469             printSupportedFeatures = true;
    1470             continue;
    1471         }
    1472 
    14731467        if (!stricmp(argv[i], "--show-webview")) {
    14741468            showWebView = true;
     
    15811575    prepareConsistentTestingEnvironment(standardPreferences.get(), standardPreferencesPrivate.get());
    15821576
    1583     if (printSupportedFeatures) {
    1584         BOOL acceleratedCompositingAvailable = FALSE;
    1585         standardPreferences->acceleratedCompositingEnabled(&acceleratedCompositingAvailable);
    1586 
    1587 #if ENABLE(3D_TRANSFORMS)
    1588         // In theory, we could have a software-based 3D rendering implementation that we use when
    1589         // hardware-acceleration is not available. But we don't have any such software
    1590         // implementation, so 3D rendering is only available when hardware-acceleration is.
    1591         BOOL threeDTransformsAvailable = acceleratedCompositingAvailable;
    1592 #else
    1593         BOOL threeDTransformsAvailable = FALSE;
    1594 #endif
    1595 
    1596         fprintf(testResult, "SupportedFeatures:%s %s\n", acceleratedCompositingAvailable ? "AcceleratedCompositing" : "", threeDTransformsAvailable ? "3DTransforms" : "");
    1597         return 0;
    1598     }
    1599 
    16001577    COMPtr<IWebView> webView(AdoptCOM, createWebViewAndOffscreenWindow(&webViewWindow));
    16011578    if (!webView)
  • trunk/Tools/Scripts/webkitpy/port/base.py

    r244310 r245733  
    3232
    3333import difflib
    34 import itertools
    3534import json
    3635import logging
    3736import os
    38 import operator
    3937import optparse
    4038import re
     
    15581556        return dirs_to_skip
    15591557
    1560     def _runtime_feature_list(self):
    1561         """If a port makes certain features available only through runtime flags, it can override this routine to indicate which ones are available."""
    1562         return None
    1563 
    1564     def nm_command(self):
    1565         return 'nm'
    1566 
    1567     def _modules_to_search_for_symbols(self):
    1568         path = self._path_to_webcore_library()
    1569         if path:
    1570             return [path]
    1571         return []
    1572 
    1573     def _symbols_string(self):
    1574         symbols = ''
    1575         for path_to_module in self._modules_to_search_for_symbols():
    1576             try:
    1577                 symbols += self._executive.run_command([self.nm_command(), path_to_module], ignore_errors=True)
    1578             except OSError as e:
    1579                 _log.warn("Failed to run nm: %s.  Can't determine supported features correctly." % e)
    1580         return symbols
    1581 
    1582     # Ports which use run-time feature detection should define this method and return
    1583     # a dictionary mapping from Feature Names to skipped directoires.  NRWT will
    1584     # run DumpRenderTree --print-supported-features and parse the output.
    1585     # If the Feature Names are not found in the output, the corresponding directories
    1586     # will be skipped.
    1587     def _missing_feature_to_skipped_tests(self):
    1588         """Return the supported feature dictionary. Keys are feature names and values
    1589         are the lists of directories to skip if the feature name is not matched."""
    1590         # FIXME: This list matches WebKitWin and should be moved onto the Win port.
    1591         return {
    1592             "Accelerated Compositing": ["compositing"],
    1593             "3D Rendering": ["animations/3d", "transforms/3d"],
    1594         }
    1595 
    1596     def _has_test_in_directories(self, directory_lists, test_list):
    1597         if not test_list:
    1598             return False
    1599 
    1600         directories = itertools.chain.from_iterable(directory_lists)
    1601         for directory, test in itertools.product(directories, test_list):
    1602             if test.startswith(directory):
    1603                 return True
    1604         return False
    1605 
    16061558    def _skipped_tests_for_unsupported_features(self, test_list):
    1607         # Only check the runtime feature list of there are tests in the test_list that might get skipped.
    1608         # This is a performance optimization to avoid the subprocess call to DRT.
    1609         # If the port supports runtime feature detection, disable any tests
    1610         # for features missing from the runtime feature list.
    1611         # If _runtime_feature_list returns a non-None value, then prefer
    1612         # runtime feature detection over static feature detection.
    1613         if self._has_test_in_directories(self._missing_feature_to_skipped_tests().values(), test_list):
    1614             supported_feature_list = self._runtime_feature_list()
    1615             if supported_feature_list is not None:
    1616                 return reduce(operator.add, [directories for feature, directories in self._missing_feature_to_skipped_tests().items() if feature not in supported_feature_list])
    1617 
    16181559        return []
    16191560
  • trunk/Tools/Scripts/webkitpy/port/darwin.py

    r243559 r245733  
    234234        return self.xcrun_find('make', '/usr/bin/make')
    235235
    236     def nm_command(self):
    237         return self.xcrun_find('nm', 'nm')
    238 
    239236    def xcrun_find(self, command, fallback=None):
    240237        fallback = fallback or command
  • trunk/Tools/Scripts/webkitpy/port/ios_simulator.py

    r240339 r245733  
    9797        SimulatedDeviceManager.tear_down(self.host)
    9898
    99     def nm_command(self):
    100         return self.xcrun_find('nm')
    101 
    10299    @property
    103100    @memoized
  • trunk/Tools/Scripts/webkitpy/port/port_testcase.py

    r239989 r245733  
    5757    port_name = "testwebkitport"
    5858
    59     def __init__(self, port_name=None, symbols_string=None,
     59    def __init__(self, port_name=None,
    6060                 expectations_file=None, skips_file=None, host=None, config=None,
    6161                 **kwargs):
    6262        port_name = port_name or TestWebKitPort.port_name
    63         self.symbols_string = symbols_string  # Passing "" disables all staticly-detectable features.
    6463        host = host or MockSystemHost()
    6564        super(TestWebKitPort, self).__init__(host, port_name=port_name, **kwargs)
     
    6766    def all_test_configurations(self):
    6867        return [self.test_configuration()]
    69 
    70     def _symbols_string(self):
    71         return self.symbols_string
    7268
    7369    def _tests_for_other_platforms(self, **kwargs):
     
    501497        self.assertEqual(port.path_to_test_expectations_file(), '/mock-checkout/LayoutTests/platform/testwebkitport/TestExpectations')
    502498
    503     def test_skipped_directories_for_features(self):
    504         supported_features = ["Accelerated Compositing", "Foo Feature"]
    505         expected_directories = set(["animations/3d", "transforms/3d"])
    506         port = TestWebKitPort(supported_features=supported_features)
    507         port._runtime_feature_list = lambda: supported_features
    508         result_directories = set(port._skipped_tests_for_unsupported_features(test_list=["animations/3d/foo.html"]))
    509         self.assertEqual(result_directories, expected_directories)
    510 
    511     def test_skipped_directories_for_features_no_matching_tests_in_test_list(self):
    512         supported_features = ["Accelerated Compositing", "Foo Feature"]
    513         expected_directories = set([])
    514         result_directories = set(TestWebKitPort(supported_features=supported_features)._skipped_tests_for_unsupported_features(test_list=['foo.html']))
    515         self.assertEqual(result_directories, expected_directories)
    516 
    517     def test_skipped_tests_for_unsupported_features_empty_test_list(self):
    518         supported_features = ["Accelerated Compositing", "Foo Feature"]
    519         expected_directories = set([])
    520         result_directories = set(TestWebKitPort(supported_features=supported_features)._skipped_tests_for_unsupported_features(test_list=None))
    521         self.assertEqual(result_directories, expected_directories)
    522 
    523499    def test_skipped_layout_tests(self):
    524500        self.assertEqual(TestWebKitPort().skipped_layout_tests(test_list=[]), set(['media']))
  • trunk/Tools/Scripts/webkitpy/port/watch_simulator.py

    r240150 r245733  
    8888        SimulatedDeviceManager.tear_down(self.host)
    8989
    90     def nm_command(self):
    91         return self.xcrun_find('nm')
    92 
    9390    @property
    9491    @memoized
  • trunk/Tools/Scripts/webkitpy/port/win.py

    r245544 r245733  
    155155        self._run_script('run-safari', [abspath_to_uri(SystemHost().platform, results_filename)])
    156156
    157     def _runtime_feature_list(self):
    158         supported_features_command = [self._path_to_driver(), '--print-supported-features']
    159         try:
    160             output = self._executive.run_command(supported_features_command, ignore_errors=True)
    161         except OSError as e:
    162             _log.warn("Exception running driver: %s, %s.  Driver must be built before calling WebKitPort.test_expectations()." % (supported_features_command, e))
    163             return None
    164 
    165         # Note: win/DumpRenderTree.cpp does not print a leading space before the features_string.
    166         match_object = re.match("SupportedFeatures:\s*(?P<features_string>.*)\s*", output)
    167         if not match_object:
    168             return None
    169         return match_object.group('features_string').split(' ')
    170 
    171157    def _build_path(self, *comps):
    172158        """Returns the full path to the test driver (DumpRenderTree)."""
  • trunk/Tools/Scripts/webkitpy/port/win_unittest.py

    r227427 r245733  
    9494        self.assertEqual('win', self.make_port().operating_system())
    9595
    96     def test_runtime_feature_list(self):
    97         port = self.make_port()
    98         port._executive.run_command = lambda command, cwd=None, ignore_errors=False: "Nonsense"
    99         # runtime_features_list returns None when its results are meaningless (it couldn't run DRT or parse the output, etc.)
    100         self.assertEqual(port._runtime_feature_list(), None)
    101         port._executive.run_command = lambda command, cwd=None, ignore_errors=False: "SupportedFeatures:foo bar"
    102         self.assertEqual(port._runtime_feature_list(), ['foo', 'bar'])
    103 
    10496    def test_expectations_files(self):
    10597        self.assertEqual(len(self.make_port().expectations_files()), 3)
  • trunk/Tools/WebKitTestRunner/Options.cpp

    r235467 r245733  
    5555{
    5656    options.shouldDumpPixelsForAllTests = true;
    57     return true;
    58 }
    59 
    60 static bool handleOptionPrintSupportedFeatures(Options& options, const char*, const char*)
    61 {
    62     options.printSupportedFeatures = true;
    6357    return true;
    6458}
     
    128122    optionList.append(Option("--pixel-tests", "Check pixels.", handleOptionPixelTests));
    129123    optionList.append(Option("-p", "Check pixels.", handleOptionPixelTests));
    130     optionList.append(Option("--print-supported-features", "For DumpRenderTree compatibility.", handleOptionPrintSupportedFeatures));
    131124    optionList.append(Option("--complex-text", "Force complex tests.", handleOptionComplexText));
    132125    optionList.append(Option("--accelerated-drawing", "Use accelerated drawing.", handleOptionAcceleratedDrawing));
  • trunk/Tools/WebKitTestRunner/Options.h

    r235408 r245733  
    4343    bool gcBetweenTests { false };
    4444    bool shouldDumpPixelsForAllTests { false };
    45     bool printSupportedFeatures { false };
    4645    bool forceComplexText { false };
    4746    bool shouldUseAcceleratedDrawing { false };
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r245299 r245733  
    460460    m_allowAnyHTTPSCertificateForAllowedHosts = options.allowAnyHTTPSCertificateForAllowedHosts;
    461461
    462     if (options.printSupportedFeatures) {
    463         // FIXME: On Windows, DumpRenderTree uses this to expose whether it supports 3d
    464         // transforms and accelerated compositing. When we support those features, we
    465         // should match DRT's behavior.
    466         exit(0);
    467     }
    468 
    469462    m_usingServerMode = (m_paths.size() == 1 && m_paths[0] == "-");
    470463    if (m_usingServerMode)
Note: See TracChangeset for help on using the changeset viewer.