[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:52:58 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 81b7d8bee4bf77b13e1df9d453aace98da249082
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 4 06:31:43 2010 +0000

    2010-01-03  Chris Jerdonek  <chris.jerdonek at gmail.com>
    
            Reviewed by Eric Seidel.
    
            Added script to test both Perl and Python, and renamed
            run-webkit-unittests to test-webkit-python.
    
            https://bugs.webkit.org/show_bug.cgi?id=33045
    
            * Scripts/VCSUtils_unittest.pl:
              - Tweaked so it can be run from outside Scripts directory.
    
            * Scripts/run-webkit-unittests: Removed.
              - Renamed to test-webkit-python.
    
            * Scripts/test-webkit-perl:
              - Tweaked so it can be run from outside Scripts directory.
    
            * Scripts/test-webkit-python: Copied from Scripts/run-webkit-unittests.
    
            * Scripts/test-webkit-scripts: Added.
              - Runs both test-webkit-perl and test-webkit-python.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52702 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index a9faccd..eed06c3 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,26 @@
+2010-01-03  Chris Jerdonek  <chris.jerdonek at gmail.com>
+
+        Reviewed by Eric Seidel.
+
+        Added script to test both Perl and Python, and renamed
+        run-webkit-unittests to test-webkit-python.
+
+        https://bugs.webkit.org/show_bug.cgi?id=33045
+
+        * Scripts/VCSUtils_unittest.pl:
+          - Tweaked so it can be run from outside Scripts directory.
+
+        * Scripts/run-webkit-unittests: Removed.
+          - Renamed to test-webkit-python.
+
+        * Scripts/test-webkit-perl:
+          - Tweaked so it can be run from outside Scripts directory.
+
+        * Scripts/test-webkit-python: Copied from Scripts/run-webkit-unittests.
+
+        * Scripts/test-webkit-scripts: Added.
+          - Runs both test-webkit-perl and test-webkit-python.
+
 2010-01-03  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKitTools/Scripts/VCSUtils_unittest.pl b/WebKitTools/Scripts/VCSUtils_unittest.pl
index 7881924..17dadcb 100755
--- a/WebKitTools/Scripts/VCSUtils_unittest.pl
+++ b/WebKitTools/Scripts/VCSUtils_unittest.pl
@@ -32,6 +32,9 @@
 
 use Test::Simple tests => 21;
 
+use FindBin;
+use lib $FindBin::Bin; # so this script can be run from any directory.
+
 use VCSUtils;
 
 # Call a function while suppressing STDERR.
diff --git a/WebKitTools/Scripts/test-webkit-perl b/WebKitTools/Scripts/test-webkit-perl
index a05a2df..e4e5836 100755
--- a/WebKitTools/Scripts/test-webkit-perl
+++ b/WebKitTools/Scripts/test-webkit-perl
@@ -30,6 +30,11 @@
 
 # Runs unit tests of WebKit Perl code.
 
+use FindBin;
 use Test::Harness;
 
-runtests("VCSUtils_unittest.pl");
+# Use an absolute path so this script can be run from any directory.
+$scriptsDir = $FindBin::Bin;
+$scriptsDir =~ s|/+$||; # Remove trailing '/'
+
+runtests("$scriptsDir/VCSUtils_unittest.pl");
diff --git a/WebKitTools/Scripts/run-webkit-unittests b/WebKitTools/Scripts/test-webkit-python
similarity index 100%
rename from WebKitTools/Scripts/run-webkit-unittests
rename to WebKitTools/Scripts/test-webkit-python
diff --git a/WebKitTools/Scripts/test-webkit-scripts b/WebKitTools/Scripts/test-webkit-scripts
new file mode 100755
index 0000000..fbe27fa
--- /dev/null
+++ b/WebKitTools/Scripts/test-webkit-scripts
@@ -0,0 +1,83 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2009 Chris Jerdonek (chris.jerdonek at gmail.com)
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+# its contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""Tests WebKit Perl and Python scripts.
+
+Syntax: test-webkit-scripts [--all]
+
+    --all    Runs all available tests, including those suppressed
+             by default.
+"""
+
+import getopt
+import os
+import subprocess
+import sys
+
+def test_script(title, script_path, args=None):
+    """Run the given test command."""
+    print('Testing %s:' % title)
+
+    call_args = [script_path]
+    if args is not None:
+        call_args.extend(args)
+    subprocess.call(call_args)
+    print(70 * "*") # dividing line
+
+if __name__ == '__main__':
+
+    try:
+        (opts, filenames) = getopt.getopt(sys.argv[1:], '', ['help', 'all'])
+    except getopt.GetoptError:
+        print(__doc__)
+        sys.exit('Error: invalid option.')
+
+    should_include_all = False
+
+    for (opt, val) in opts:
+        if opt == '--help':
+            print(__doc__)
+            sys.exit()
+        elif opt == '--all':
+            should_include_all = True
+
+    # Use absolute paths so this script can be run from any directory.
+    scripts_directory = sys.path[0]
+
+    test_script('Perl scripts', os.path.join(scripts_directory, 'test-webkit-perl'))
+
+    test_script('Python scripts',
+                os.path.join(scripts_directory, 'test-webkit-python'),
+                ['--all'] if should_include_all else None)
+
+    # FIXME: Display a cumulative indication of success or failure.
+    #        In addition, call sys.exit() with 0 or 1 depending on that
+    #        cumulative success or failure.
+    print('Note: Perl and Python results appear separately above.')

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list