Changeset 110250 in webkit


Ignore:
Timestamp:
Mar 8, 2012 7:07:22 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[NRWT] Fix --platform=qt-5.0 --new-baseline combo
https://bugs.webkit.org/show_bug.cgi?id=72489

Patch by Rafael Brandao <rafael.lobo@openbossa.org> on 2012-03-08
Reviewed by Dirk Pranke.

NRWT: The default platform name for Qt combined with --webkit-test-runner is now
"qt-5.0-wk2" instead of "qt-linux" and that name is now prefered for tests.
--platform will override the platform name and then we'll use it.

ORWT: We check for qt version and use platform name "qt-4.8" if the version is lower
than 5.0.0, and then we choose between "qt-5.0-wk1" and "qt-5.0-wk2". --platform will
override it in the end.

  • Scripts/old-run-webkit-tests:
  • Scripts/webkitpy/layout_tests/port/qt.py:

(QtPort):
(QtPort.determine_full_port_name):
(QtPort.baseline_search_path):

  • Scripts/webkitpy/layout_tests/port/qt_unittest.py:

(QtPortTest):
(QtPortTest._assert_search_path):
(QtPortTest.test_baseline_search_path):

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r110218 r110250  
     12012-03-08  Rafael Brandao  <rafael.lobo@openbossa.org>
     2
     3        [NRWT] Fix --platform=qt-5.0 --new-baseline combo
     4        https://bugs.webkit.org/show_bug.cgi?id=72489
     5
     6        Reviewed by Dirk Pranke.
     7
     8        NRWT: The default platform name for Qt combined with --webkit-test-runner is now
     9        "qt-5.0-wk2" instead of "qt-linux" and that name is now prefered for tests.
     10        --platform will override the platform name and then we'll use it.
     11
     12        ORWT: We check for qt version and use platform name "qt-4.8" if the version is lower
     13        than 5.0.0, and then we choose between "qt-5.0-wk1" and "qt-5.0-wk2". --platform will
     14        override it in the end.
     15
     16        * Scripts/old-run-webkit-tests:
     17        * Scripts/webkitpy/layout_tests/port/qt.py:
     18        (QtPort):
     19        (QtPort.determine_full_port_name):
     20        (QtPort.baseline_search_path):
     21        * Scripts/webkitpy/layout_tests/port/qt_unittest.py:
     22        (QtPortTest):
     23        (QtPortTest._assert_search_path):
     24        (QtPortTest.test_baseline_search_path):
     25
    1262012-03-08  Beth Dakin  <bdakin@apple.com>
    227
  • trunk/Tools/Scripts/old-run-webkit-tests

    r110157 r110250  
    233233    }
    234234} elsif (isQt()) {
    235     $platform = "qt";
     235    if (getQtVersion() lt "5.0") {
     236        $platform = "qt-4.8";
     237    } else {
     238        $platform = "qt-5.0-wk1";
     239    }
    236240} elsif (isGtk()) {
    237241    $platform = "gtk";
     
    329333setConfiguration();
    330334
     335if ($useWebKitTestRunner) {
     336    if (isAppleMacWebKit()) {
     337        $realPlatform = $platform;
     338        $platform = "mac-wk2";
     339    } elsif (isAppleWinWebKit()) {
     340        $stripEditingCallbacks = 0 unless defined $stripEditingCallbacks;
     341        $realPlatform = $platform;
     342        $platform = "win-wk2";
     343    } elsif (isQt()) {
     344        $realPlatform = $platform;
     345        $platform = "qt-5.0-wk2";
     346    } elsif (isGtk()) {
     347        $realPlatform = $platform;
     348        $platform = "gtk-wk2";
     349    }
     350}
     351
    331352my $getOptionsResult = GetOptions(
    332353    'add-platform-exceptions' => \$addPlatformExceptions,
     
    383404}
    384405
    385 if ($useWebKitTestRunner) {
    386     if (isAppleMacWebKit()) {
    387         $realPlatform = $platform;
    388         $platform = "mac-wk2";
    389     } elsif (isAppleWinWebKit()) {
    390         $stripEditingCallbacks = 0 unless defined $stripEditingCallbacks;
    391         $realPlatform = $platform;
    392         $platform = "win-wk2";
    393     } elsif (isQt()) {
    394         $realPlatform = $platform;
    395         $platform = "qt-5.0-wk2";
    396     } elsif (isGtk()) {
    397         $realPlatform = $platform;
    398         $platform = "gtk-wk2";
    399     }
    400 }
    401 
    402406$timeoutSeconds *= 10 if $guardMalloc;
    403407
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/qt.py

    r110157 r110250  
    4848    port_name = "qt"
    4949
     50    @classmethod
    5051    def _wk2_port_name(self):
    5152        return "qt-5.0-wk2"
     
    5859        if port_name and port_name != cls.port_name:
    5960            return port_name
    60         return port_name + '-' + host.platform.os_name
     61        if hasattr(options, 'webkit_test_runner') and getattr(options, 'webkit_test_runner'):
     62            return cls._wk2_port_name()
     63        return cls.port_name + '-' + host.platform.os_name
    6164
    6265    # sys_platform exists only for unit testing.
     
    109112    def baseline_search_path(self):
    110113        search_paths = []
    111         if self.get_option('webkit_test_runner'):
    112             search_paths.append(self._wk2_port_name())
    113114        search_paths.append(self.name())
    114115        version = self.qt_version()
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py

    r107397 r110250  
    3939
    4040class QtPortTest(port_testcase.PortTestCase):
    41     port_name = 'qt-mac'
     41    port_name = 'qt'
    4242    port_maker = QtPort
    4343
    44     def _assert_search_path(self, search_paths, os_name=None, use_webkit2=False, qt_version='4.8'):
     44    def _assert_search_path(self, search_paths, os_name=None, override_platform=None, use_webkit2=False, qt_version='4.8'):
    4545        # FIXME: Port constructors should not "parse" the port name, but
    4646        # rather be passed components (directly or via setters).  Once
     
    4848        host = MockSystemHost(os_name=os_name)
    4949        host.executive = MockExecutive2(self._qt_version(qt_version))
    50         port_name = 'qt-' + os_name
    51         port = self.make_port(host=host, qt_version=qt_version, port_name=port_name,
    52                               options=MockOptions(webkit_test_runner=use_webkit2, platform='qt'))
     50        options = MockOptions(webkit_test_runner=use_webkit2, platform='qt')
     51        port_name = QtPort.determine_full_port_name(host=host, options=options, port_name=override_platform)
     52        port = self.make_port(host=host, qt_version=qt_version, port_name=port_name, options=options)
    5353        absolute_search_paths = map(port._webkit_baseline_path, search_paths)
    5454        self.assertEquals(port.baseline_search_path(), absolute_search_paths)
     
    6161
    6262    def test_baseline_search_path(self):
    63         self._assert_search_path(['qt-mac', 'qt-4.8', 'qt'], 'mac', qt_version='4.8')
    64         self._assert_search_path(['qt-win', 'qt-4.8', 'qt'], 'win', qt_version='4.8')
    65         self._assert_search_path(['qt-linux', 'qt-4.8', 'qt'], 'linux', qt_version='4.8')
     63        self._assert_search_path(['qt-mac', 'qt-4.8', 'qt'], os_name='mac', qt_version='4.8')
     64        self._assert_search_path(['qt-win', 'qt-4.8', 'qt'], os_name='win', qt_version='4.8')
     65        self._assert_search_path(['qt-linux', 'qt-4.8', 'qt'], os_name='linux', qt_version='4.8')
    6666
    67         self._assert_search_path(['qt-mac', 'qt-4.8', 'qt'], 'mac')
    68         self._assert_search_path(['qt-win', 'qt-4.8', 'qt'], 'win')
    69         self._assert_search_path(['qt-linux', 'qt-4.8', 'qt'], 'linux')
     67        self._assert_search_path(['qt-4.8', 'qt-4.8', 'qt'], os_name='mac', override_platform='qt-4.8', qt_version='4.8')
     68        self._assert_search_path(['qt-4.8', 'qt-4.8', 'qt'], os_name='win', override_platform='qt-4.8', qt_version='4.8')
     69        self._assert_search_path(['qt-4.8', 'qt-4.8', 'qt'], os_name='linux', override_platform='qt-4.8', qt_version='4.8')
    7070
    71         self._assert_search_path(['qt-5.0-wk2', 'qt-mac', 'qt-5.0', 'qt'], 'mac', use_webkit2=True, qt_version='5.0')
    72         self._assert_search_path(['qt-5.0-wk2', 'qt-win', 'qt-5.0', 'qt'], 'win', use_webkit2=True, qt_version='5.0')
    73         self._assert_search_path(['qt-5.0-wk2', 'qt-linux', 'qt-5.0', 'qt'], 'linux', use_webkit2=True, qt_version='5.0')
     71        self._assert_search_path(['qt-mac', 'qt-4.8', 'qt'], os_name='mac')
     72        self._assert_search_path(['qt-win', 'qt-4.8', 'qt'], os_name='win')
     73        self._assert_search_path(['qt-linux', 'qt-4.8', 'qt'], os_name='linux')
     74
     75        self._assert_search_path(['qt-5.0-wk2', 'qt-5.0', 'qt'], os_name='mac', use_webkit2=True, qt_version='5.0')
     76        self._assert_search_path(['qt-5.0-wk2', 'qt-5.0', 'qt'], os_name='win', use_webkit2=True, qt_version='5.0')
     77        self._assert_search_path(['qt-5.0-wk2', 'qt-5.0', 'qt'], os_name='linux', use_webkit2=True, qt_version='5.0')
     78
     79        self._assert_search_path(['qt-mac', 'qt-5.0', 'qt'], os_name='mac', override_platform='qt-mac', use_webkit2=True, qt_version='5.0')
     80        self._assert_search_path(['qt-win', 'qt-5.0', 'qt'], os_name='win', override_platform='qt-win', use_webkit2=True, qt_version='5.0')
     81        self._assert_search_path(['qt-linux', 'qt-5.0', 'qt'], os_name='linux', override_platform='qt-linux', use_webkit2=True, qt_version='5.0')
    7482
    7583    def test_show_results_html_file(self):
Note: See TracChangeset for help on using the changeset viewer.