diff options
author | dpranke@google.com <dpranke@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-12 01:27:06 +0000 |
---|---|---|
committer | dpranke@google.com <dpranke@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-12 01:27:06 +0000 |
commit | 95853f348dddde2cae8eb9f8c3ca04cd1754c430 (patch) | |
tree | 9c8a5880197a4d6ee3bc0702d0b3b365506f0c93 /webkit | |
parent | 2e2a5404a58ae577ebfa65e6f7575eec8cd393cf (diff) | |
download | chromium_src-95853f348dddde2cae8eb9f8c3ca04cd1754c430.zip chromium_src-95853f348dddde2cae8eb9f8c3ca04cd1754c430.tar.gz chromium_src-95853f348dddde2cae8eb9f8c3ca04cd1754c430.tar.bz2 |
Add code to enable chromium-win-vista platform for vista-specific diffs.
Code to actually turn it on is still commented out (and will remain so
until the rebaselining tool works as well).
BUG=none
R=pam@chromium.org
TEST=none
Review URL: http://codereview.chromium.org/165337
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
3 files changed, 28 insertions, 11 deletions
diff --git a/webkit/tools/layout_tests/layout_package/platform_utils_win.py b/webkit/tools/layout_tests/layout_package/platform_utils_win.py index c8939e1..9075854 100644 --- a/webkit/tools/layout_tests/layout_package/platform_utils_win.py +++ b/webkit/tools/layout_tests/layout_package/platform_utils_win.py @@ -14,6 +14,7 @@ to fall back to the base functions. import os import re import subprocess +import sys import google.httpd_utils import google.path_utils @@ -37,6 +38,12 @@ def IsNonWindowsPlatformTargettingWindowsResults(): def GetTestListPlatformName(): """Returns the name we use to identify the platform in the layout test test list files.""" + #winver = sys.getwindowsversion() + #if winver[0] == 6 and winver[1] == 0: + # return "WIN-VISTA" + #elif winver[0] == 5 and (winver[1] == 1 or winver[1] == 2): + # return "WIN-XP" + #default to returning 'WIN' if it's an unsupported version return "WIN" class PlatformUtility(google.platform_utils_win.PlatformUtility): @@ -228,13 +235,13 @@ class PlatformUtility(google.platform_utils_win.PlatformUtility): def TestListPlatformDir(self): """Return the platform-specific directory for where the test lists live.""" - return 'win' + return GetTestListPlatformName().lower() def PlatformDir(self): """Returns the most specific directory name where platform-specific results live. """ - return 'chromium-win' + return 'chromium-' + GetTestListPlatformName().lower() def PlatformNewResultsDir(self): """Returns the directory name in which to output newly baselined tests. diff --git a/webkit/tools/layout_tests/layout_package/test_expectations.py b/webkit/tools/layout_tests/layout_package/test_expectations.py index 089b896..fa12894 100644 --- a/webkit/tools/layout_tests/layout_package/test_expectations.py +++ b/webkit/tools/layout_tests/layout_package/test_expectations.py @@ -183,7 +183,7 @@ class TestExpectationsFile: DEFER: Test does not count in our statistics for the current release. DEBUG: Expectations apply only to the debug build. RELEASE: Expectations apply only to release build. - LINUX/WIN/MAC: Expectations apply only to these platforms. + LINUX/WIN/WIN-XP/WIN-VISTA/MAC: Expectations apply only to these platforms. Notes: -A test cannot be both SLOW and TIMEOUT @@ -198,7 +198,7 @@ class TestExpectationsFile: 'timeout': TIMEOUT, 'crash': CRASH } - PLATFORMS = [ 'mac', 'linux', 'win' ] + PLATFORMS = [ 'mac', 'linux', 'win', 'win-xp', 'win-vista' ] BUILD_TYPES = [ 'debug', 'release' ] @@ -421,7 +421,7 @@ class TestExpectationsFile: self._AddError(lineno, 'Invalid modifier for test: %s' % option, test_and_expectations) - if has_any_platform and not self._platform in options: + if has_any_platform and not self._MatchPlatform(options): return False if not has_bug_id and 'wontfix' not in options: @@ -442,6 +442,19 @@ class TestExpectationsFile: return True + def _MatchPlatform(self, options): + """Match the list of options against our specified platform. If any + of the options prefix-match self._platform, return True. This handles + the case where a test is marked WIN and the platform is WIN-VISTA. + + Args: + options: list of options + """ + for opt in options: + if self._platform.startswith(opt): + return True + return False + def _AddToAllExpectations(self, test, options, expectations): if not test in self._all_expectations: self._all_expectations[test] = [] diff --git a/webkit/tools/layout_tests/run_webkit_tests.py b/webkit/tools/layout_tests/run_webkit_tests.py index da34c7b..dbb79c0 100755 --- a/webkit/tools/layout_tests/run_webkit_tests.py +++ b/webkit/tools/layout_tests/run_webkit_tests.py @@ -118,12 +118,9 @@ class TestRunner: if options.lint_test_files: # Creating the expecations for each platform/target pair does all the # test list parsing and ensures it's correct syntax(e.g. no dupes). - self._ParseExpectations('win', is_debug_mode=True) - self._ParseExpectations('win', is_debug_mode=False) - self._ParseExpectations('mac', is_debug_mode=True) - self._ParseExpectations('mac', is_debug_mode=False) - self._ParseExpectations('linux', is_debug_mode=True) - self._ParseExpectations('linux', is_debug_mode=False) + for platform in TestExpectationsFile.PLATFORMS: + self._ParseExpectations(platform, is_debug_mode=True) + self._ParseExpectations(platform, is_debug_mode=False) else: self._GatherTestFiles(paths) self._expectations = self._ParseExpectations( |