[Webkit-unassigned] [Bug 44709] deduplicate-tests should be runnable from any WebKit directory

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 9 17:07:33 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=44709





--- Comment #3 from Dirk Pranke <dpranke at chromium.org>  2010-09-09 17:07:33 PST ---
(From update of attachment 67116)
> diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
> index 1807a838c1a39f7b97f4e184509935cc548d7e37..0d9653bc8c75eb021d002ffc84d9d35386e06d78 100644
> --- a/WebKitTools/ChangeLog
> +++ b/WebKitTools/ChangeLog
> @@ -1,3 +1,13 @@
> +2010-09-09  Tony Chang  <tony at chromium.org>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        deduplicate-tests should be runnable from any WebKit directory
> +        https://bugs.webkit.org/show_bug.cgi?id=44709
> +
> +        * Scripts/webkitpy/layout_tests/deduplicate_tests.py:
> +        * Scripts/webkitpy/layout_tests/deduplicate_tests_unittest.py:
> +
>  2010-09-09  Mihai Parparita  <mihaip at chromium.org>
>  
>          Reviewed by Tony Chang.
> diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/deduplicate_tests.py b/WebKitTools/Scripts/webkitpy/layout_tests/deduplicate_tests.py
> index c543d9183a406e78714202e83c99565452357409..beeb680650070a12e0f0f07d8ba80cb9d7860740 100644
> --- a/WebKitTools/Scripts/webkitpy/layout_tests/deduplicate_tests.py
> +++ b/WebKitTools/Scripts/webkitpy/layout_tests/deduplicate_tests.py
> @@ -36,6 +36,7 @@ import os
>  import subprocess
>  import sys
>  import re
> +import webkitpy.common.checkout.scm as scm
>  import webkitpy.common.system.executive as executive
>  import webkitpy.common.system.logutils as logutils
>  import webkitpy.layout_tests.port.factory as port_factory
> @@ -56,7 +57,8 @@ def port_fallbacks():
>          try:
>              platforms = port_factory.get(port_name).baseline_search_path()
>          except NotImplementedError:
> -            _log.error("'%s' lacks baseline_search_path(), please fix." % port_name)
> +            _log.error("'%s' lacks baseline_search_path(), please fix."
> +                       % port_name)

We don't actually require 80 char lines, but I won't complain if you're 
trying to maintain them anyway (I do).

>              fallbacks[port_name] = [_BASE_PLATFORM]
>              continue
>          fallbacks[port_name] = [os.path.basename(p) for p in platforms][1:]
> @@ -156,11 +158,35 @@ def has_intermediate_results(test, fallbacks, matching_platform,
>      return False
>  
>  
> -def find_dups(hashes, port_fallbacks):
> +def get_relative_test_path(filename, relative_to):
> +    """Constructs a relative path to |filename| from |relative_to|.  Also, if
> +    |relative_to| is a sub directory of the layout test directory and
> +    |filename| is not in |relative_to|, return None.  This lets us filter
> +    the results to only show results that are under where the script was run
> +    from.
> +    Args:
> +        filename: The test file we're trying to get a relative path to.
> +        relative_to: The path we're relative to.

Nit: I might note that relative_to needs to be an absolute path.

Otherwise, LGTM although I'm not a reviewer.

-- Dirk

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list