summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorvictorw@chromium.org <victorw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-16 17:57:36 +0000
committervictorw@chromium.org <victorw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-16 17:57:36 +0000
commita6032f572f54f65e4977cb4355e44c7e0b3fe385 (patch)
treeec7b288e9e09d23d658fe751d64d31f637a87c9e /webkit
parentca28f67cdb38529900ec17e616d9239c76fca23e (diff)
downloadchromium_src-a6032f572f54f65e4977cb4355e44c7e0b3fe385.zip
chromium_src-a6032f572f54f65e4977cb4355e44c7e0b3fe385.tar.gz
chromium_src-a6032f572f54f65e4977cb4355e44c7e0b3fe385.tar.bz2
Rebaseline tool support for Windows XP and Vista:
-. By default, pull archived results from Vista for windows baselines. rebaseline tool pulls data from debug Vista buildbot until we setup a release Vista buildbot. -. Add win-xp to rebaseline platforms. 'win' now refers to vista. -. Add option to platform_utils_win so return search directories for all windows platforms. -. Remove an option that is no longer needed. TEST=none BUG=none Review URL: http://codereview.chromium.org/204027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26364 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/layout_tests/layout_package/path_utils.py10
-rw-r--r--webkit/tools/layout_tests/layout_package/platform_utils_linux.py2
-rw-r--r--webkit/tools/layout_tests/layout_package/platform_utils_mac.py2
-rw-r--r--webkit/tools/layout_tests/layout_package/platform_utils_win.py19
-rw-r--r--webkit/tools/layout_tests/rebaseline.py58
5 files changed, 58 insertions, 33 deletions
diff --git a/webkit/tools/layout_tests/layout_package/path_utils.py b/webkit/tools/layout_tests/layout_package/path_utils.py
index 46a21af..a7e24bc 100644
--- a/webkit/tools/layout_tests/layout_package/path_utils.py
+++ b/webkit/tools/layout_tests/layout_package/path_utils.py
@@ -58,15 +58,15 @@ def BaselineSearchPath(platform=None):
source tree. If parameter platform is None, returns the list for the current
platform that the script is running on."""
if platform is None:
- return platform_utils.BaselineSearchPath()
+ return platform_utils.BaselineSearchPath(False)
elif platform.startswith('mac'):
- return platform_utils_mac.BaselineSearchPath()
+ return platform_utils_mac.BaselineSearchPath(True)
elif platform.startswith('win'):
- return platform_utils_win.BaselineSearchPath()
+ return platform_utils_win.BaselineSearchPath(True)
elif platform.startswith('linux'):
- return platform_utils_linux.BaselineSearchPath()
+ return platform_utils_linux.BaselineSearchPath(True)
else:
- return platform_utils.BaselineSearchPath()
+ return platform_utils.BaselineSearchPath(False)
def ExpectedBaseline(filename, suffix, platform=None, all_baselines=False):
"""Given a test name, finds where the baseline result is located. The
diff --git a/webkit/tools/layout_tests/layout_package/platform_utils_linux.py b/webkit/tools/layout_tests/layout_package/platform_utils_linux.py
index 61267f8..3d0eedf 100644
--- a/webkit/tools/layout_tests/layout_package/platform_utils_linux.py
+++ b/webkit/tools/layout_tests/layout_package/platform_utils_linux.py
@@ -23,7 +23,7 @@ def PlatformVersion():
minor versions, it returns ''."""
return ''
-def BaselineSearchPath():
+def BaselineSearchPath(all_versions=False):
"""Returns the list of directories to search for baselines/results, in
order of preference. Paths are relative to the top of the source tree."""
return [path_utils.ChromiumBaselinePath(PlatformName()),
diff --git a/webkit/tools/layout_tests/layout_package/platform_utils_mac.py b/webkit/tools/layout_tests/layout_package/platform_utils_mac.py
index 51c8506..ff0c99f 100644
--- a/webkit/tools/layout_tests/layout_package/platform_utils_mac.py
+++ b/webkit/tools/layout_tests/layout_package/platform_utils_mac.py
@@ -38,7 +38,7 @@ def PlatformVersion():
# TODO: We should add leopard and snowleopard to the list of paths to check
# once we start running the tests from snowleopard.
-def BaselineSearchPath():
+def BaselineSearchPath(all_versions=False):
"""Returns the list of directories to search for baselines/results, in
order of preference. Paths are relative to the top of the source tree."""
return [path_utils.ChromiumBaselinePath(PlatformName()),
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 7e44afc..bb1bb9e 100644
--- a/webkit/tools/layout_tests/layout_package/platform_utils_win.py
+++ b/webkit/tools/layout_tests/layout_package/platform_utils_win.py
@@ -26,13 +26,24 @@ def PlatformVersion():
return '-xp'
return ''
-def BaselineSearchPath():
+def BaselineSearchPath(all_versions=False):
"""Returns the list of directories to search for baselines/results, in
- order of preference. Paths are relative to the top of the source tree."""
+ order of preference. Paths are relative to the top of the source tree.
+
+ If all_versions is True, returns the full list of search directories
+ for all versions instead of the current version that the script
+ is running on. This is for case that the platform or version of
+ the search paths is different from the platform or version that the
+ script is running on. For example, the rebaseline tool may run on Mac,
+ Linux or Windows Vista to rebaseline for Windows XP, in which case,
+ it gets a full list, finds the rebaselining dir (XP) and compares
+ the XP baseline with fallback baselines.
+ """
+
dirs = []
- if PlatformVersion() in ("-vista", "-xp"):
+ if all_versions or PlatformVersion() in ("-vista", "-xp"):
dirs.append(path_utils.ChromiumBaselinePath('chromium-win-vista'))
- if PlatformVersion() == "-xp":
+ if all_versions or PlatformVersion() == "-xp":
dirs.append(path_utils.ChromiumBaselinePath('chromium-win-xp'))
dirs.append(path_utils.ChromiumBaselinePath('chromium-win'))
dirs.append(path_utils.WebKitBaselinePath('win'))
diff --git a/webkit/tools/layout_tests/rebaseline.py b/webkit/tools/layout_tests/rebaseline.py
index 8ea4edb..5f7dfc2d 100644
--- a/webkit/tools/layout_tests/rebaseline.py
+++ b/webkit/tools/layout_tests/rebaseline.py
@@ -36,7 +36,17 @@ from test_types import image_diff
from test_types import text_diff
BASELINE_SUFFIXES = ['.txt', '.png', '.checksum']
-REBASELINE_PLATFORM_ORDER = ['mac', 'win', 'linux']
+REBASELINE_PLATFORM_ORDER = ['mac', 'win', 'win-xp', 'linux']
+ARCHIVE_DIR_NAME_DICT = {'win': 'webkit-dbg-vista',
+ 'win-vista': 'webkit-dbg-vista',
+ 'win-xp': 'webkit-rel',
+ 'mac': 'webkit-rel-mac5',
+ 'linux': 'webkit-rel-linux',
+ 'win-canary': 'webkit-dbg-vista',
+ 'win-vista-canary': 'webkit-dbg-vista',
+ 'win-xp-canary': 'webkit-rel-webkit-org',
+ 'mac-canary': 'webkit-rel-mac-webkit-org',
+ 'linux-canary': 'webkit-rel-linux-webkit-org'}
def RunShell(command, print_output=False):
"""Executes a command and returns the output.
@@ -249,6 +259,24 @@ class Rebaseliner(object):
logging.info('Latest revision: "%s"', revisions[len(revisions) - 1])
return revisions[len(revisions) - 1]
+ def _GetArchiveDirName(self, platform, webkit_canary):
+ """Get name of the layout test archive directory.
+
+ Returns:
+ Directory name or
+ None on failure
+ """
+
+ if webkit_canary:
+ platform += '-canary'
+
+ if platform in ARCHIVE_DIR_NAME_DICT:
+ return ARCHIVE_DIR_NAME_DICT[platform]
+ else:
+ logging.error('Cannot find platform key %s in archive directory name '
+ 'dictionary', platform)
+ return None
+
def _GetArchiveUrl(self):
"""Generate the url to download latest layout test archive.
@@ -257,23 +285,14 @@ class Rebaseliner(object):
None on failure
"""
- platform_name = self._options.buildbot_platform_dir_basename
- if self._options.webkit_canary:
- if self._platform == 'mac':
- platform_name += '-mac-webkit-org'
- elif self._platform == 'linux':
- platform_name += '-linux-webkit-org'
- else:
- platform_name += '-webkit-org'
- else:
- if self._platform == 'mac':
- platform_name += '-mac5'
- elif self._platform == 'linux':
- platform_name += '-linux'
+ dir_name = self._GetArchiveDirName(self._platform,
+ self._options.webkit_canary)
+ if not dir_name:
+ return None
- logging.debug('Buildbot platform dir name: "%s"', platform_name)
+ logging.debug('Buildbot platform dir name: "%s"', dir_name)
- url_base = '%s/%s/' % (self._options.archive_url, platform_name)
+ url_base = '%s/%s/' % (self._options.archive_url, dir_name)
latest_revision = self._GetLatestRevision(url_base)
if latest_revision is None or latest_revision <= 0:
return None
@@ -845,7 +864,7 @@ def main():
help='include debug-level logging.')
option_parser.add_option('-p', '--platforms',
- default='mac,win,linux',
+ default='mac,win,win-xp,linux',
help=('Comma delimited list of platforms that need '
'rebaselining.'))
@@ -859,11 +878,6 @@ def main():
default='layout-test-results',
help='Layout test result archive name.')
- option_parser.add_option('-n', '--buildbot_platform_dir_basename',
- default='webkit-rel',
- help=('Base name of buildbot platform directory '
- 'that stores the layout test results.'))
-
option_parser.add_option('-w', '--webkit_canary',
action='store_true',
default=False,