WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Proposed patch 3
patch-tools6-3.txt (text/plain), 11.18 KB, created by
Chris Jerdonek
on 2009-12-31 14:07:45 PST
(
hide
)
Description:
Proposed patch 3
Filename:
MIME Type:
Creator:
Chris Jerdonek
Created:
2009-12-31 14:07:45 PST
Size:
11.18 KB
patch
obsolete
>Index: WebKitTools/ChangeLog >=================================================================== >--- WebKitTools/ChangeLog (revision 52685) >+++ WebKitTools/ChangeLog (working copy) >@@ -1,3 +1,26 @@ >+2009-12-31 Chris Jerdonek <chris.jerdonek@gmail.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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. >+ > 2009-12-31 Adam Barth <abarth@webkit.org> > > Reviewed by Eric Seidel. >Index: WebKitTools/Scripts/VCSUtils_unittest.pl >=================================================================== >--- WebKitTools/Scripts/VCSUtils_unittest.pl (revision 52685) >+++ WebKitTools/Scripts/VCSUtils_unittest.pl (working copy) >@@ -32,6 +32,9 @@ > > use Test::Simple tests => 7; > >+use FindBin; >+use lib $FindBin::Bin; # so this script can be run from any directory. >+ > use VCSUtils; > > # fixChangeLogPatch >Index: WebKitTools/Scripts/run-webkit-unittests >=================================================================== >--- WebKitTools/Scripts/run-webkit-unittests (revision 52685) >+++ WebKitTools/Scripts/run-webkit-unittests (working copy) >@@ -1,61 +0,0 @@ >-#!/usr/bin/env python >-# Copyright (c) 2009 Google Inc. All rights reserved. >-# >-# 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 Google Inc. 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. >- >-import sys >-import unittest >- >-from modules.bugzilla_unittest import * >-from modules.buildbot_unittest import * >-from modules.buildsteps_unittest import * >-from modules.changelogs_unittest import * >-from modules.commands.download_unittest import * >-from modules.commands.early_warning_system_unittest import * >-from modules.commands.upload_unittest import * >-from modules.commands.queries_unittest import * >-from modules.commands.queues_unittest import * >-from modules.committers_unittest import * >-from modules.credentials_unittest import * >-from modules.cpp_style_unittest import * >-from modules.diff_parser_unittest import * >-from modules.executive_unittest import * >-from modules.multicommandtool_unittest import * >-from modules.queueengine_unittest import * >-from modules.style_unittest import * >-from modules.text_style_unittest import * >-from modules.webkit_logging_unittest import * >-from modules.webkitport_unittest import * >- >-if __name__ == "__main__": >- # FIXME: This is a hack, but I'm tired of commenting out the test. >- # See https://bugs.webkit.org/show_bug.cgi?id=31818 >- if len(sys.argv) > 1 and sys.argv[1] == "--all": >- sys.argv.remove("--all") >- from modules.scm_unittest import * >- >- unittest.main() >Index: WebKitTools/Scripts/test-webkit-perl >=================================================================== >--- WebKitTools/Scripts/test-webkit-perl (revision 52685) >+++ WebKitTools/Scripts/test-webkit-perl (working copy) >@@ -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"); >Index: WebKitTools/Scripts/test-webkit-python >=================================================================== >--- WebKitTools/Scripts/test-webkit-python (revision 52681) (from Scripts/run-webkit-unittests:52681) >+++ WebKitTools/Scripts/test-webkit-python (working copy) >@@ -0,0 +1,61 @@ >+#!/usr/bin/env python >+# Copyright (c) 2009 Google Inc. All rights reserved. >+# >+# 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 Google Inc. 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. >+ >+import sys >+import unittest >+ >+from modules.bugzilla_unittest import * >+from modules.buildbot_unittest import * >+from modules.buildsteps_unittest import * >+from modules.changelogs_unittest import * >+from modules.commands.download_unittest import * >+from modules.commands.early_warning_system_unittest import * >+from modules.commands.upload_unittest import * >+from modules.commands.queries_unittest import * >+from modules.commands.queues_unittest import * >+from modules.committers_unittest import * >+from modules.credentials_unittest import * >+from modules.cpp_style_unittest import * >+from modules.diff_parser_unittest import * >+from modules.executive_unittest import * >+from modules.multicommandtool_unittest import * >+from modules.queueengine_unittest import * >+from modules.style_unittest import * >+from modules.text_style_unittest import * >+from modules.webkit_logging_unittest import * >+from modules.webkitport_unittest import * >+ >+if __name__ == "__main__": >+ # FIXME: This is a hack, but I'm tired of commenting out the test. >+ # See https://bugs.webkit.org/show_bug.cgi?id=31818 >+ if len(sys.argv) > 1 and sys.argv[1] == "--all": >+ sys.argv.remove("--all") >+ from modules.scm_unittest import * >+ >+ unittest.main() >Index: WebKitTools/Scripts/test-webkit-scripts >=================================================================== >--- WebKitTools/Scripts/test-webkit-scripts (revision 0) >+++ WebKitTools/Scripts/test-webkit-scripts (revision 0) >@@ -0,0 +1,66 @@ >+#!/usr/bin/python >+# >+# Copyright (C) 2009 Chris Jerdonek (chris.jerdonek@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.""" >+ >+import getopt >+import os >+import subprocess >+import sys >+ >+def test_script(command, title): >+ """Run the given test command.""" >+ print('Testing %s:' % title) >+ subprocess.call(command) >+ print(70 * "*") # dividing line >+ >+if __name__ == '__main__': >+ >+ try: >+ (opts, filenames) = getopt.getopt(sys.argv[1:], '', ['help']) >+ except getopt.GetoptError: >+ print(__doc__) >+ sys.exit('Error: the only valid option is --help.') >+ >+ for (opt, val) in opts: >+ if opt == '--help': >+ print(__doc__) >+ sys.exit() >+ >+ # Use absolute paths so this script can be run from any directory. >+ scripts_directory = sys.path[0] >+ >+ test_script(os.path.join(scripts_directory, 'test-webkit-perl'), 'Perl scripts') >+ test_script(os.path.join(scripts_directory, 'test-webkit-python'), 'Python scripts') >+ >+ # 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.') > >Property changes on: WebKitTools/Scripts/test-webkit-scripts >___________________________________________________________________ >Added: svn:executable > + * >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
cjerdonek
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 33045
:
45646
|
45721
|
45722
|
45723
|
45765