[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

hayato at chromium.org hayato at chromium.org
Wed Dec 22 16:23:16 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f33dc67f7db39be47c36962bb3253fb0dee636c8
Author: hayato at chromium.org <hayato at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 22 22:52:30 2010 +0000

    2010-11-22  Hayato Ito  <hayato at chromium.org>
    
            Reviewed by Shinichiro Hamaji.
    
            Ignore reference files which will be used by reftests when collecting
            test cases.
            https://bugs.webkit.org/show_bug.cgi?id=49835
    
            * Scripts/webkitpy/layout_tests/port/test_files.py:
            * Scripts/webkitpy/layout_tests/port/test_files_unittest.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72564 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ddd0f84..51c7009 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-22  Hayato Ito  <hayato at chromium.org>
+
+        Reviewed by Shinichiro Hamaji.
+
+        Ignore reference files which will be used by reftests when collecting
+        test cases.
+        https://bugs.webkit.org/show_bug.cgi?id=49835
+
+        * Scripts/webkitpy/layout_tests/port/test_files.py:
+        * Scripts/webkitpy/layout_tests/port/test_files_unittest.py:
+
 2010-11-22  Adam Roben  <aroben at apple.com>
 
         Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/test_files.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/test_files.py
index 3fa0fb3..2c0a7b6 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/test_files.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/test_files.py
@@ -78,7 +78,7 @@ def find(port, paths):
     # Now walk all the paths passed in on the command line and get filenames
     test_files = set()
     for path in paths_to_walk:
-        if os.path.isfile(path) and _has_supported_extension(path):
+        if os.path.isfile(path) and _is_test_file(path):
             test_files.add(os.path.normpath(path))
             continue
 
@@ -95,7 +95,7 @@ def find(port, paths):
                     dirs.remove(directory)
 
             for filename in files:
-                if _has_supported_extension(filename):
+                if _is_test_file(filename):
                     filename = os.path.join(root, filename)
                     filename = os.path.normpath(filename)
                     test_files.add(filename)
@@ -111,3 +111,18 @@ def _has_supported_extension(filename):
     test on."""
     extension = os.path.splitext(filename)[1]
     return extension in _supported_file_extensions
+
+
+def _is_reference_html_file(filename):
+    """Return true if the filename points to a reference HTML file."""
+    if (filename.endswith('-expected.html') or
+        filename.endswith('-expected-mismatch.html')):
+        _log.warn("Reftests are not supported - ignoring %s" % filename)
+        return True
+    return False
+
+
+def _is_test_file(filename):
+    """Return true if the filename points to a test file."""
+    return (_has_supported_extension(filename) and
+            not _is_reference_html_file(filename))
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/test_files_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/test_files_unittest.py
index c37eb92..83525c8 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/test_files_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/test_files_unittest.py
@@ -63,6 +63,13 @@ class TestFilesTest(unittest.TestCase):
         tests = test_files.find(port, ['userscripts/resources'])
         self.assertEqual(tests, set([]))
 
+    def test_is_test_file(self):
+        self.assertTrue(test_files._is_test_file('foo.html'))
+        self.assertTrue(test_files._is_test_file('foo.shtml'))
+        self.assertFalse(test_files._is_test_file('foo.png'))
+        self.assertFalse(test_files._is_test_file('foo-expected.html'))
+        self.assertFalse(test_files._is_test_file('foo-expected-mismatch.html'))
+
 
 if __name__ == '__main__':
     unittest.main()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list