Changeset 225698 in webkit
- Timestamp:
- Dec 8, 2017 1:56:09 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 63 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r225678 r225698 1 2017-12-08 Konstantin Tokarev <annulen@yandex.ru> 2 3 [python] Replace print operator with print() function for python3 compatibility 4 https://bugs.webkit.org/show_bug.cgi?id=180592 5 6 Reviewed by Michael Catanzaro. 7 8 * html5lib/generate-test-wrappers.py: 9 (_remove_stale_tests): 10 * http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py: 11 (web_socket_do_extra_handshake): 12 * http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py: 13 (web_socket_do_extra_handshake): 14 * http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py: 15 (web_socket_do_extra_handshake): 16 * http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py: 17 (web_socket_do_extra_handshake): 18 * http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py: 19 (web_socket_do_extra_handshake): 20 1 21 2017-12-08 Ms2ger <Ms2ger@igalia.com> 2 22 -
trunk/LayoutTests/html5lib/generate-test-wrappers.py
r144032 r225698 76 76 name = self._test_name_from_harness_name(name) 77 77 if name not in test_names: 78 print "Removing %s, %s no longer exists." % (path, self._input_path(name))78 print("Removing %s, %s no longer exists." % (path, self._input_path(name))) 79 79 os.remove(path) 80 80 … … 83 83 name = self._test_name_from_harness_name(name) 84 84 if name not in test_names: 85 print "Removing %s, %s no longer exists." % (path, self._input_path(name))85 print("Removing %s, %s no longer exists." % (path, self._input_path(name))) 86 86 os.remove(path) 87 87 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py
r94164 r225698 11 11 msg += "\r\n" 12 12 request.connection.write(msg) 13 print msg13 print(msg) 14 14 raise handshake.AbortedByUserException("Abort the connection") # Prevents pywebsocket from sending its own handshake message. 15 15 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py
r111554 r225698 11 11 msg += '\r\n' 12 12 request.connection.write(msg) 13 print msg13 print(msg) 14 14 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 15 15 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py
r94164 r225698 10 10 msg += '\r\n' 11 11 request.connection.write(msg) 12 print msg12 print(msg) 13 13 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 14 14 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py
r94164 r225698 10 10 msg += '\r\n' 11 11 request.connection.write(msg) 12 print msg12 print(msg) 13 13 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 14 14 -
trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py
r94164 r225698 10 10 msg += '\r\n' 11 11 request.connection.write(msg) 12 print msg12 print(msg) 13 13 raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message. 14 14 -
trunk/PerformanceTests/ChangeLog
r225524 r225698 1 2017-12-08 Konstantin Tokarev <annulen@yandex.ru> 2 3 [python] Replace print operator with print() function for python3 compatibility 4 https://bugs.webkit.org/show_bug.cgi?id=180592 5 6 Reviewed by Michael Catanzaro. 7 8 * JSBench/harness.py: 9 1 10 2017-12-01 Filip Pizlo <fpizlo@apple.com> 2 11 -
trunk/PerformanceTests/JSBench/harness.py
r201339 r225698 46 46 47 47 if len(sys.argv) != 2: 48 print "Use: python harness.py <JS executable>"48 print("Use: python harness.py <JS executable>") 49 49 exit(1) 50 50 js = sys.argv[1] … … 170 170 totals["cim"] *= 100 171 171 172 print "Final results:"173 print u" %(mean)fms \u00b1 %(cim)f%% (lower is better)" % totals174 print " Standard deviation = %(sm)f%% of mean" % totals175 print " Standard error = %(semm)f%% of mean" % totals176 print " %(runs)d runs" % {"runs": runcount}177 print ""178 179 print "Result breakdown:"180 for benchmark in benchmarks: 181 print " %(benchmark)s:" % {"benchmark": benchmark}172 print("Final results:") 173 print(u" %(mean)fms \u00b1 %(cim)f%% (lower is better)" % totals) 174 print(" Standard deviation = %(sm)f%% of mean" % totals) 175 print(" Standard error = %(semm)f%% of mean" % totals) 176 print(" %(runs)d runs" % {"runs": runcount}) 177 print("") 178 179 print("Result breakdown:") 180 for benchmark in benchmarks: 181 print(" %(benchmark)s:" % {"benchmark": benchmark}) 182 182 183 183 bmodes = modes["*"] … … 186 186 187 187 for mode in bmodes: 188 print u" %(mode)s: %(mean)fms \u00b1 %(cim)f%% (stddev=%(sm)f%%, stderr=%(semm)f%%)" % sresults[benchmark][mode]189 print ""190 191 print "Raw results:"192 for benchmark in benchmarks: 193 print " %(benchmark)s:" % {"benchmark": benchmark}194 195 bmodes = modes["*"] 196 if benchmark in modes: 197 bmodes = modes[benchmark] 198 199 for mode in bmodes: 200 print 188 print(u" %(mode)s: %(mean)fms \u00b1 %(cim)f%% (stddev=%(sm)f%%, stderr=%(semm)f%%)" % sresults[benchmark][mode]) 189 print("") 190 191 print("Raw results:") 192 for benchmark in benchmarks: 193 print(" %(benchmark)s:" % {"benchmark": benchmark}) 194 195 bmodes = modes["*"] 196 if benchmark in modes: 197 bmodes = modes[benchmark] 198 199 for mode in bmodes: 200 print(" %(mode)s: %(results)s" % { 201 201 "mode": mode, 202 202 "results": results[benchmark][mode] 203 } 203 }) -
trunk/Source/JavaScriptCore/ChangeLog
r225697 r225698 1 2017-12-08 Konstantin Tokarev <annulen@yandex.ru> 2 3 [python] Replace print operator with print() function for python3 compatibility 4 https://bugs.webkit.org/show_bug.cgi?id=180592 5 6 Reviewed by Michael Catanzaro. 7 8 * Scripts/generateYarrUnicodePropertyTables.py: 9 (openOrExit): 10 (verifyUCDFilesExist): 11 (Aliases.parsePropertyAliasesFile): 12 (Aliases.parsePropertyValueAliasesFile): 13 * Scripts/make-js-file-arrays.py: 14 (main): 15 * generate-bytecode-files: 16 1 17 2017-12-08 Mark Lam <mark.lam@apple.com> 2 18 -
trunk/Source/JavaScriptCore/Scripts/generateYarrUnicodePropertyTables.py
r223081 r225698 93 93 return open(path, mode) 94 94 except IOError as e: 95 print "I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)95 print("I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)) 96 96 exit(1) 97 97 … … 112 112 fullPath = os.path.join(UCDDirectoryPath, file) 113 113 if not os.path.exists(fullPath): 114 print "Couldn't find UCD file {0} at {1}".format(file, fullPath)114 print("Couldn't find UCD file {0} at {1}".format(file, fullPath)) 115 115 missingFileCount = missingFileCount + 1 116 116 if missingFileCount: … … 151 151 152 152 if fullName in self.globalNameToAliases: 153 print "Error, already an alias for {}".format(fullName)153 print("Error, already an alias for {}".format(fullName)) 154 154 else: 155 155 self.globalNameToAliases[fullName] = aliases … … 184 184 185 185 if fullName in mapToModify: 186 print "Error, already an {} alias for {}".format(propertyType, fullName)186 print("Error, already an {} alias for {}".format(propertyType, fullName)) 187 187 else: 188 188 mapToModify[fullName] = aliases -
trunk/Source/JavaScriptCore/Scripts/make-js-file-arrays.py
r219289 r225698 47 47 (options, arguments) = parser.parse_args() 48 48 if not options.namespace: 49 print 'Error: must provide a namespace'49 print('Error: must provide a namespace') 50 50 parser.print_usage() 51 51 exit(-1) 52 52 if len(arguments) < 3: 53 print 'Error: must provide at least 3 arguments'53 print('Error: must provide at least 3 arguments') 54 54 parser.print_usage() 55 55 exit(-1) -
trunk/Source/JavaScriptCore/generate-bytecode-files
r220753 r225698 92 92 return open(path, mode) 93 93 except IOError as e: 94 print "I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)94 print("I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)) 95 95 exit(1) 96 96 … … 218 218 bytecodeSections = json.load(bytecodeFile, encoding = "utf-8") 219 219 except: 220 print "Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info())220 print("Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info())) 221 221 222 222 if bytecodeHFilename: -
trunk/Source/WebCore/PAL/AVFoundationSupport.py
r222148 r225698 44 44 45 45 46 print "/* Identifying AVFoundation Support */"46 print("/* Identifying AVFoundation Support */") 47 47 if lookFor("/include/AVFoundationCF/AVCFBase.h"): 48 print "#define HAVE_AVCF 1"48 print("#define HAVE_AVCF 1") 49 49 if lookFor("/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h"): 50 print "#define HAVE_AVCF_LEGIBLE_OUTPUT 1"50 print("#define HAVE_AVCF_LEGIBLE_OUTPUT 1") 51 51 if lookFor("/include/AVFoundationCF/AVCFAssetResourceLoader.h"): 52 print "#define HAVE_AVFOUNDATION_LOADER_DELEGATE 1"52 print("#define HAVE_AVFOUNDATION_LOADER_DELEGATE 1") 53 53 if lookFor("/include/AVFoundationCF/AVCFAsset.h"): 54 54 regexp = re.compile("AVCFURLAssetIsPlayableExtendedMIMEType") 55 55 if fileContains("/include/AVFoundationCF/AVCFAsset.h", regexp): 56 print "#define HAVE_AVCFURL_PLAYABLE_MIMETYPE 1"56 print("#define HAVE_AVCFURL_PLAYABLE_MIMETYPE 1") 57 57 if lookFor("/include/QuartzCore/CACFLayer.h"): 58 58 regexp = re.compile("CACFLayerSetContentsScale") 59 59 if fileContains("/include/QuartzCore/CACFLayer.h", regexp): 60 print "#define HAVE_CACFLAYER_SETCONTENTSSCALE 1"60 print("#define HAVE_CACFLAYER_SETCONTENTSSCALE 1") 61 61 if lookFor("/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h"): 62 62 regexp = re.compile("kAVCFPlayerItemLegibleOutput_CallbacksVersion_2") 63 63 if fileContains("/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h", regexp): 64 print "#define HAVE_AVCFPLAYERITEM_CALLBACK_VERSION_2 1"64 print("#define HAVE_AVCFPLAYERITEM_CALLBACK_VERSION_2 1") -
trunk/Source/WebCore/PAL/ChangeLog
r225696 r225698 1 2017-12-08 Konstantin Tokarev <annulen@yandex.ru> 2 3 [python] Replace print operator with print() function for python3 compatibility 4 https://bugs.webkit.org/show_bug.cgi?id=180592 5 6 Reviewed by Michael Catanzaro. 7 8 * AVFoundationSupport.py: 9 1 10 2017-12-08 Eric Carlson <eric.carlson@apple.com> 2 11 -
trunk/Tools/BuildSlaveSupport/wait-for-SVN-server.py
r173871 r225698 32 32 response = p.communicate()[0] 33 33 if p.returncode != 0: 34 print "Can't connect to host: %s, return code %s " % (SVNServer, p.returncode)35 print "OUTPUT:"36 print response34 print("Can't connect to host: %s, return code %s " % (SVNServer, p.returncode)) 35 print("OUTPUT:") 36 print(response) 37 37 return -1 38 38 try: … … 41 41 return el.getAttribute("revision") 42 42 except xml.parsers.expat.ExpatError, e: 43 print "FAILED TO PARSE 'svn log' XML:"44 print str(e)45 print "----"46 print "RECEIVED TEXT:"47 print response43 print("FAILED TO PARSE 'svn log' XML:") 44 print(str(e)) 45 print("----") 46 print("RECEIVED TEXT:") 47 print(response) 48 48 sys.exit(1) 49 49 … … 52 52 if not revision or not revision.isdigit(): 53 53 latestRevision = int(getLatestSVNRevision(SVNServer)) 54 print "Latest SVN revision on %s is r%d. Don't wait, because revision argument isn't a valid SVN revision." % (SVNServer, latestRevision)54 print("Latest SVN revision on %s is r%d. Don't wait, because revision argument isn't a valid SVN revision." % (SVNServer, latestRevision)) 55 55 return 56 56 … … 59 59 latestRevision = int(getLatestSVNRevision(SVNServer)) 60 60 if latestRevision == -1: 61 print "%s SVN server is unreachable. Sleeping for 60 seconds." % (SVNServer)61 print("%s SVN server is unreachable. Sleeping for 60 seconds." % (SVNServer)) 62 62 time.sleep(60) 63 63 elif latestRevision < revision: 64 print "Latest SVN revision on %s is r%d, but we are waiting for r%d. Sleeping for 5 seconds." % (SVNServer, latestRevision, revision)64 print("Latest SVN revision on %s is r%d, but we are waiting for r%d. Sleeping for 5 seconds." % (SVNServer, latestRevision, revision)) 65 65 time.sleep(5) 66 66 else: 67 print "Latest SVN revision on %s is r%d, which is newer or equal than r%d." % (SVNServer, latestRevision, revision)67 print("Latest SVN revision on %s is r%d, which is newer or equal than r%d." % (SVNServer, latestRevision, revision)) 68 68 break 69 69 -
trunk/Tools/ChangeLog
r225696 r225698 1 2017-12-08 Konstantin Tokarev <annulen@yandex.ru> 2 3 [python] Replace print operator with print() function for python3 compatibility 4 https://bugs.webkit.org/show_bug.cgi?id=180592 5 6 Reviewed by Michael Catanzaro. 7 8 * BuildSlaveSupport/wait-for-SVN-server.py: 9 (getLatestSVNRevision): 10 (waitForSVNRevision): 11 * Scripts/download-latest-github-release.py: 12 (find_latest_release): 13 (main): 14 * Scripts/update-wasm-gcc-torture.py: 15 (update_lkgr): 16 (untar_torture): 17 (list_js_files): 18 (waterfall_known_failures): 19 * Scripts/update-webkit-wincairo-libs.py: 20 * Scripts/webkitpy/benchmark_runner/benchmark_runner.py: 21 (BenchmarkRunner.show_results): 22 * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: 23 (SimpleHTTPServerDriver.fetch_result): 24 * Scripts/webkitpy/benchmark_runner/run_benchmark.py: 25 (list_benchmark_plans): 26 * Scripts/webkitpy/bindings/main.py: 27 (BindingsTests.generate_from_idl): 28 (BindingsTests.generate_supplemental_dependency): 29 (BindingsTests.detect_changes): 30 (BindingsTests.run_tests): 31 (BindingsTests.main): 32 * Scripts/webkitpy/codegen/main.py: 33 (BuiltinsGeneratorTests.generate_from_js_builtins): 34 (BuiltinsGeneratorTests.detect_changes): 35 (BuiltinsGeneratorTests.single_builtin_test): 36 (BuiltinsGeneratorTests.run_test): 37 (BuiltinsGeneratorTests.run_tests): 38 (BuiltinsGeneratorTests.main): 39 * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: 40 (MockBugzilla.fetch_attachment): 41 * Scripts/webkitpy/common/net/buildbot/buildbot.py: 42 (Builder._fetch_revision_to_build_map): 43 * Scripts/webkitpy/common/system/crashlogs.py: 44 (CrashLogs._find_newest_log_win): 45 * Scripts/webkitpy/common/system/outputcapture_unittest.py: 46 (OutputCaptureTest.test_output_capture_scope): 47 * Scripts/webkitpy/common/system/profiler.py: 48 (GooglePProf.profile_after_exit): 49 (Perf.profile_after_exit): 50 * Scripts/webkitpy/common/system/user.py: 51 (User.prompt_with_multiple_lists): 52 (User.prompt_with_list): 53 (User._warn_if_application_is_xcode): 54 (User.edit_changelog): 55 * Scripts/webkitpy/inspector/main.py: 56 (InspectorGeneratorTests.generate_from_json): 57 (InspectorGeneratorTests.detect_changes): 58 (InspectorGeneratorTests.run_tests): 59 (InspectorGeneratorTests.main): 60 * Scripts/webkitpy/layout_tests/controllers/manager.py: 61 (Manager._print_expectation_line_for_test): 62 (Manager._print_expectations_for_subset): 63 (Manager._print_expectations_for_subset.if): 64 * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py: 65 (run_server): 66 * Scripts/webkitpy/port/config_standalone.py: 67 (main): 68 * Scripts/webkitpy/port/darwin_testcase.py: 69 (DarwinTest.test_spindump.logging_run_command): 70 (DarwinTest.test_sample_process.logging_run_command): 71 * Scripts/webkitpy/port/ios.py: 72 (IOSPort.clean_up_test_run): 73 * Scripts/webkitpy/port/ios_device_unittest.py: 74 (IOSDeviceTest.test_spindump.logging_run_command): 75 (IOSDeviceTest.test_sample_process.logging_run_command): 76 * Scripts/webkitpy/port/ios_simulator_unittest.py: 77 (IOSSimulatorTest.test_xcrun.throwing_run_command): 78 * Scripts/webkitpy/port/leakdetector_unittest.py: 79 (test_count_total_bytes_and_unique_leaks.mock_run_script): 80 * Scripts/webkitpy/port/mac_unittest.py: 81 (MacTest.test_xcrun.throwing_run_command): 82 * Scripts/webkitpy/style/checkers/contributors.py: 83 (ContributorsChecker.check): 84 * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py: 85 (AbstractLocalServerCommand.execute): 86 * Scripts/webkitpy/tool/commands/adduserstogroups.py: 87 (AddUsersToGroups.execute): 88 * Scripts/webkitpy/tool/commands/analyzechangelog.py: 89 (AnalyzeChangeLog._generate_jsons): 90 (AnalyzeChangeLog.execute): 91 (ChangeLogAnalyzer._set_filename): 92 (ChangeLogAnalyzer.analyze): 93 * Scripts/webkitpy/tool/commands/bugfortest.py: 94 (BugForTest.execute): 95 * Scripts/webkitpy/tool/commands/bugsearch.py: 96 (execute): 97 * Scripts/webkitpy/tool/commands/findusers.py: 98 (FindUsers.execute): 99 * Scripts/webkitpy/tool/commands/gardenomatic.py: 100 (GardenOMatic.execute): 101 * Scripts/webkitpy/tool/commands/rebaseline.py: 102 (RebaselineTest.execute): 103 * Scripts/webkitpy/tool/commands/rebaselineserver.py: 104 (RebaselineServer._prepare_config): 105 * Scripts/webkitpy/tool/commands/setupgitclone.py: 106 (SetupGitClone.execute): 107 (SetupGitClone._get_username_and_email): 108 * Scripts/webkitpy/tool/commands/suggestnominations.py: 109 (SuggestNominations._print_nominations): 110 (SuggestNominations._print_counts): 111 * Scripts/webkitpy/tool/commands/upload.py: 112 (CommitMessageForCurrentDiff.execute): 113 (CreateBug.prompt_for_bug_title_and_comment): 114 * Scripts/webkitpy/tool/multicommandtool.py: 115 (HelpCommand.execute): 116 * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py: 117 (TestGardeningHTTPRequestHandler._serve_text): 118 (TestGardeningHTTPRequestHandler._serve_json): 119 * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py: 120 (AddSvnMimetypeForPng.run): 121 * Scripts/webkitpy/tool/steps/suggestreviewers.py: 122 (SuggestReviewers.run): 123 * Scripts/webkitpy/w3c/test_importer.py: 124 (TestImporter.update_tests_options): 125 * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py: 126 (WebDriverTestRunnerSelenium.run): 127 * TestResultServer/model/jsonresults_unittest.py: 128 * gtk/ycm_extra_conf.py: 129 (FlagsForFile): 130 * lldb/lldb_webkit.py: 131 (btjs): 132 1 133 2017-12-08 Eric Carlson <eric.carlson@apple.com> 2 134 -
trunk/Tools/Scripts/download-latest-github-release.py
r225498 r225698 71 71 response = urllib2.urlopen(request) 72 72 except urllib2.URLError as error: 73 print error73 print(error) 74 74 return None, None 75 75 … … 106 106 version_info_path = binary_path + '.version' 107 107 108 print 'Updating {}...'.format(args.filename)108 print('Updating {}...'.format(args.filename)) 109 109 110 110 existing_version_info = load_version_info(version_info_path) 111 111 if existing_version_info: 112 print 'Found existing release:', existing_version_info['tag_name']112 print('Found existing release:', existing_version_info['tag_name']) 113 113 else: 114 print 'No existing release found.'114 print('No existing release found.') 115 115 116 print 'Seeking latest release from {}...'.format(args.repo)116 print('Seeking latest release from {}...'.format(args.repo)) 117 117 release_url, latest_version_info = find_latest_release(args) 118 118 119 119 if not latest_version_info: 120 120 if existing_version_info: 121 print 'Falling back to existing release!'121 print('Falling back to existing release!') 122 122 return Status.USING_EXISTING 123 123 124 print 'No release found!'124 print('No release found!') 125 125 return Status.COULD_NOT_FIND 126 126 127 print 'Found latest release:', latest_version_info['tag_name']127 print('Found latest release:', latest_version_info['tag_name']) 128 128 129 129 if latest_version_info == existing_version_info: 130 print 'Already up-to-date!'130 print('Already up-to-date!') 131 131 return Status.UP_TO_DATE 132 132 … … 134 134 os.makedirs(args.output_dir) 135 135 136 print 'Downloading to {}...'.format(os.path.abspath(args.output_dir))136 print('Downloading to {}...'.format(os.path.abspath(args.output_dir))) 137 137 download_release(release_url, binary_path) 138 138 save_version_info(version_info_path, latest_version_info) 139 print 'Done!'139 print('Done!') 140 140 141 141 return Status.DOWNLOADED -
trunk/Tools/Scripts/update-wasm-gcc-torture.py
r215519 r225698 65 65 lkgr_url = LKGR_URL % args.platform 66 66 if not args.lkgr: 67 print 'Downloading: %s' % lkgr_url67 print('Downloading: %s' % lkgr_url) 68 68 args.lkgr = json.loads(urllib2.urlopen(lkgr_url).read())['build'] 69 print 'lkgr: %s' % args.lkgr69 print('lkgr: %s' % args.lkgr) 70 70 71 71 … … 74 74 torture_url = TORTURE_URL % (args.platform, args.lkgr, torture_file) 75 75 if not os.path.exists(torture_file): 76 print 'Downloading: %s' % torture_url76 print('Downloading: %s' % torture_url) 77 77 torture_download = urllib2.urlopen(torture_url) 78 78 with open(torture_file, 'wb') as f: … … 82 82 shutil.rmtree(TORTURE_DIR) 83 83 with tarfile.open(torture_file, 'r') as torture_tar: 84 print 'Extracting: %s -> %s' % (torture_file, TORTURE_DIR)84 print('Extracting: %s -> %s' % (torture_file, TORTURE_DIR)) 85 85 torture_tar.extractall() 86 86 assert os.path.isdir(TORTURE_DIR) … … 89 89 def list_js_files(args): 90 90 js_files = sorted([os.path.basename(f) for f in glob.glob(os.path.join(TORTURE_DIR, '*.js'))]) 91 print 'Found %s JavaScript tests' % len(js_files)91 print('Found %s JavaScript tests' % len(js_files)) 92 92 assert len(js_files) > 1200 93 93 return js_files … … 103 103 else: 104 104 args.waterfall_hash = subprocess.check_output(['git', 'log', '-n1', '--pretty=format:%H'], cwd=WATERFALL_DIR).strip() 105 print 'Waterfall at: %s' % args.waterfall_hash105 print('Waterfall at: %s' % args.waterfall_hash) 106 106 known_failures = [] 107 107 with open(os.path.join(WATERFALL_DIR, WATERFALL_KNOWN_FAILURES)) as failures_file: -
trunk/Tools/Scripts/update-webkit-wincairo-libs.py
r221191 r225698 38 38 # Only unzip if required 39 39 if result == download.Status.DOWNLOADED: 40 print 'Extracting release to {}...'.format(output)40 print('Extracting release to {}...'.format(output)) 41 41 zip = zipfile.ZipFile(file, 'r') 42 42 zip.extractall(output) -
trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py
r223341 r225698 157 157 def show_results(cls, results, scale_unit=True): 158 158 results = BenchmarkResults(results) 159 print results.format(scale_unit)159 print(results.format(scale_unit)) -
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py
r225440 r225698 80 80 def fetch_result(self): 81 81 (stdout, stderr) = self._server_process.communicate() 82 print stderr82 print(stderr) 83 83 return stdout 84 84 -
trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py
r224688 r225698 70 70 71 71 def list_benchmark_plans(): 72 print "Available benchmark plans: "72 print("Available benchmark plans: ") 73 73 for plan in BenchmarkRunner.available_plans(): 74 print "\t%s" % plan74 print("\t%s" % plan) 75 75 76 76 -
trunk/Tools/Scripts/webkitpy/bindings/main.py
r220220 r225698 65 65 output = self.executive.run_command(cmd) 66 66 if output: 67 print output67 print(output) 68 68 except ScriptError, e: 69 print e.output69 print(e.output) 70 70 exit_code = e.exit_code 71 71 return exit_code … … 95 95 output = self.executive.run_command(cmd) 96 96 if output: 97 print output97 print(output) 98 98 except ScriptError, e: 99 print e.output99 print(e.output) 100 100 exit_code = e.exit_code 101 101 os.remove(idl_files_list[1]) … … 119 119 120 120 if exit_code or output: 121 print 'FAIL: (%s) %s' % (generator, output_file)122 print output121 print('FAIL: (%s) %s' % (generator, output_file)) 122 print(output) 123 123 changes_found = True 124 124 if self.json_file_name: 125 125 self.failures.append("(%s) %s" % (generator, output_file)) 126 126 elif self.verbose: 127 print 'PASS: (%s) %s' % (generator, output_file)127 print('PASS: (%s) %s' % (generator, output_file)) 128 128 return changes_found 129 129 … … 160 160 161 161 if self.reset_results: 162 print "Reset results: (%s) %s" % (generator, input_file)162 print("Reset results: (%s) %s" % (generator, input_file)) 163 163 continue 164 164 … … 183 183 serviceworkerglobalscope_constructors_file = tempfile.mkstemp()[1] 184 184 if self.generate_supplemental_dependency(input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file, dedicatedworkerglobalscope_constructors_file, serviceworkerglobalscope_constructors_file): 185 print 'Failed to generate a supplemental dependency file.'185 print('Failed to generate a supplemental dependency file.') 186 186 os.remove(supplemental_dependency_file) 187 187 os.remove(window_constructors_file) … … 211 211 json.dump(json_data, json_file) 212 212 213 print ''213 print('') 214 214 if all_tests_passed: 215 print 'All tests PASS!'215 print('All tests PASS!') 216 216 return 0 217 217 else: 218 print 'Some tests FAIL! (To update the reference files, execute "run-bindings-tests --reset-results")'218 print('Some tests FAIL! (To update the reference files, execute "run-bindings-tests --reset-results")') 219 219 return -1 -
trunk/Tools/Scripts/webkitpy/codegen/main.py
r203554 r225698 59 59 self.write_error_file(framework_name + "JSBuiltins.h-error" if generate_wrappers else builtins_files[0], output_directory, stderr_output) 60 60 except ScriptError, e: 61 print e.output61 print(e.output) 62 62 exit_code = e.exit_code 63 63 return exit_code … … 86 86 87 87 if exit_code or output: 88 print 'FAIL: %s' % output_file89 print output88 print('FAIL: %s' % output_file) 89 print(output) 90 90 changes_found = True 91 91 else: 92 print 'PASS: %s' % output_file92 print('PASS: %s' % output_file) 93 93 return changes_found 94 94 … … 96 96 (framework_name, test_case, output_mode) = test_name.split('-') 97 97 if not framework_name or not output_mode or not test_case: 98 print "Invalid test case name: should be Framework-TestCaseName-OutputMode.js"98 print("Invalid test case name: should be Framework-TestCaseName-OutputMode.js") 99 99 return False 100 100 … … 116 116 117 117 if self.reset_results: 118 print "Reset results for test: %s" % (test_name)118 print("Reset results for test: %s" % (test_name)) 119 119 return True 120 120 … … 142 142 143 143 if self.reset_results: 144 print "Reset results for test: %s" % (input_file)144 print("Reset results for test: %s" % (input_file)) 145 145 continue 146 146 … … 162 162 all_tests_passed = False 163 163 164 print ''164 print('') 165 165 if all_tests_passed: 166 print 'All tests PASS!'166 print('All tests PASS!') 167 167 return 0 168 168 else: 169 print 'Some tests FAIL! (To update the reference files, execute "run-builtins-generator-tests --reset-results")'169 print('Some tests FAIL! (To update the reference files, execute "run-builtins-generator-tests --reset-results")') 170 170 return -1 -
trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py
r223177 r225698 402 402 attachment_dictionary = self.attachment_cache.get(attachment_id) 403 403 if not attachment_dictionary: 404 print "MOCK: fetch_attachment: %s is not a known attachment id" % attachment_id404 print("MOCK: fetch_attachment: %s is not a known attachment id" % attachment_id) 405 405 return None 406 406 bug = self.fetch_bug(attachment_dictionary["bug_id"]) -
trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
r224691 r225698 159 159 # FIXME: This is a poor way to do revision -> build mapping. 160 160 # Better would be to ask buildbot through some sort of API. 161 print "Loading revision/build list from %s." % self.results_url()162 print "This may take a while..."161 print("Loading revision/build list from %s." % self.results_url()) 162 print("This may take a while...") 163 163 result_files = self._buildbot._fetch_twisted_directory_listing(self.results_url()) 164 164 except urllib2.HTTPError, error: -
trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py
r220708 r225698 121 121 return errors + log_file 122 122 except IOError, e: 123 print "IOError %s" % str(e)123 print("IOError %s" % str(e)) 124 124 if include_errors: 125 125 errors += u"ERROR: Failed to read '%s': %s\n" % (path, str(e)) 126 126 except OSError, e: 127 print "OSError %s" % str(e)127 print("OSError %s" % str(e)) 128 128 if include_errors: 129 129 errors += u"ERROR: Failed to read '%s': %s\n" % (path, str(e)) 130 130 except UnicodeDecodeError, e: 131 print "UnicodeDecodeError %s" % str(e)131 print("UnicodeDecodeError %s" % str(e)) 132 132 if include_errors: 133 133 errors += u"ERROR: Failed to decode '%s' as ascii: %s\n" % (path, str(e)) -
trunk/Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py
r217758 r225698 62 62 scope = OutputCaptureScope() 63 63 with scope: 64 print 'STRING 1'64 print('STRING 1') 65 65 self.assertEqual(('STRING 1\n', '', ''), scope.captured_output) 66 66 67 67 with scope: 68 print 'STRING 2'68 print('STRING 2') 69 69 self.assertEqual(('STRING 2\n', '', ''), scope.captured_output) 70 70 -
trunk/Tools/Scripts/webkitpy/common/system/profiler.py
r166711 r225698 117 117 # google-pprof doesn't check its arguments, so we have to. 118 118 if not (self._host.filesystem.exists(self._output_path)): 119 print "Failed to gather profile, %s does not exist." % self._output_path119 print("Failed to gather profile, %s does not exist." % self._output_path) 120 120 return 121 121 122 122 pprof_args = [self._pprof_path(), '--text', self._executable_path, self._output_path] 123 123 profile_text = self._host.executive.run_command(pprof_args) 124 print "First 10 lines of pprof --text:"125 print self._first_ten_lines_of_profile(profile_text)126 print "http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html documents output."127 print 128 print "To interact with the the full profile, including produce graphs:"129 print ' '.join([self._pprof_path(), self._executable_path, self._output_path])124 print("First 10 lines of pprof --text:") 125 print(self._first_ten_lines_of_profile(profile_text)) 126 print("http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html documents output.") 127 print() 128 print("To interact with the the full profile, including produce graphs:") 129 print(' '.join([self._pprof_path(), self._executable_path, self._output_path])) 130 130 131 131 … … 172 172 print "'perf record' failed, ", 173 173 if exit_code: 174 print "exit code was %i." % exit_code174 print("exit code was %i." % exit_code) 175 175 else: 176 print "the profiled process with pid %i is still running." % self._watched_pid176 print("the profiled process with pid %i is still running." % self._watched_pid) 177 177 return 178 178 179 179 perf_report_args = [self._perf_path(), 'report', '--call-graph', 'none', '--input', self._output_path] 180 180 perf_report_output = self._host.executive.run_command(perf_report_args) 181 print "First 10 lines of 'perf report --call-graph=none':"182 183 print " ".join(perf_report_args)184 print "\n".join(self._first_ten_lines_of_profile(perf_report_output))185 186 print "To view the full profile, run:"187 print ' '.join([self._perf_path(), 'report', '-i', self._output_path])188 print # An extra line between tests looks nicer.181 print("First 10 lines of 'perf report --call-graph=none':") 182 183 print(" ".join(perf_report_args)) 184 print("\n".join(self._first_ten_lines_of_profile(perf_report_output))) 185 186 print("To view the full profile, run:") 187 print(' '.join([self._perf_path(), 'report', '-i', self._output_path])) 188 print() # An extra line between tests looks nicer. 189 189 190 190 -
trunk/Tools/Scripts/webkitpy/common/system/user.py
r202362 r225698 78 78 item_index = 0 79 79 cumulated_list = [] 80 print list_title80 print(list_title) 81 81 for i in range(len(subtitles)): 82 print "\n" + subtitles[i]82 print("\n" + subtitles[i]) 83 83 for item in lists[i]: 84 84 item_index += 1 85 print "%2d. %s" % (item_index, item)85 print("%2d. %s" % (item_index, item)) 86 86 cumulated_list += lists[i] 87 87 return cls._wait_on_list_response(cumulated_list, can_choose_multiple, raw_input) … … 116 116 @classmethod 117 117 def prompt_with_list(cls, list_title, list_items, can_choose_multiple=False, raw_input=raw_input): 118 print list_title118 print(list_title) 119 119 i = 0 120 120 for item in list_items: 121 121 i += 1 122 print "%2d. %s" % (i, item)122 print("%2d. %s" % (i, item)) 123 123 return cls._wait_on_list_response(list_items, can_choose_multiple, raw_input) 124 124 … … 134 134 def _warn_if_application_is_xcode(self, edit_application): 135 135 if "Xcode" in edit_application: 136 print "Instead of using Xcode.app, consider using EDITOR=\"xed --wait\"."136 print("Instead of using Xcode.app, consider using EDITOR=\"xed --wait\".") 137 137 138 138 def edit_changelog(self, files): … … 141 141 # On Mac we support editing ChangeLogs using an application. 142 142 args = shlex.split(edit_application) 143 print "Using editor in the CHANGE_LOG_EDIT_APPLICATION environment variable."144 print "Please quit the editor application when done editing."143 print("Using editor in the CHANGE_LOG_EDIT_APPLICATION environment variable.") 144 print("Please quit the editor application when done editing.") 145 145 self._warn_if_application_is_xcode(edit_application) 146 146 subprocess.call(["open", "-W", "-n", "-a"] + args + files) -
trunk/Tools/Scripts/webkitpy/inspector/main.py
r210308 r225698 55 55 self.write_error_file(json_file, output_directory, stderr_output) 56 56 except ScriptError, e: 57 print e.output57 print(e.output) 58 58 exit_code = e.exit_code 59 59 return exit_code … … 82 82 83 83 if exit_code or output: 84 print 'FAIL: %s' % output_file85 print output84 print('FAIL: %s' % output_file) 85 print(output) 86 86 changes_found = True 87 87 else: 88 print 'PASS: %s' % output_file88 print('PASS: %s' % output_file) 89 89 return changes_found 90 90 … … 106 106 107 107 if self.reset_results: 108 print "Reset results for test: %s" % (input_file)108 print("Reset results for test: %s" % (input_file)) 109 109 continue 110 110 … … 139 139 all_tests_passed = all_tests_passed and self.run_tests(platform_name, input_directory, reference_directory) 140 140 141 print ''141 print('') 142 142 if all_tests_passed: 143 print 'All tests PASS!'143 print('All tests PASS!') 144 144 return 0 145 145 else: 146 print 'Some tests FAIL! (To update the reference files, execute "run-inspector-generator-tests --reset-results")'146 print('Some tests FAIL! (To update the reference files, execute "run-inspector-generator-tests --reset-results")') 147 147 return -1 -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
r223132 r225698 541 541 def _print_expectation_line_for_test(self, format_string, test): 542 542 line = self._expectations.model().get_expectation_line(test) 543 print format_string.format(test, line.expected_behavior, self._expectations.readable_filename_and_line_number(line), line.original_string or '')543 print(format_string.format(test, line.expected_behavior, self._expectations.readable_filename_and_line_number(line), line.original_string or '')) 544 544 545 545 def _print_expectations_for_subset(self, device_class, test_col_width, tests_to_run, tests_to_skip={}): 546 546 format_string = '{{:{width}}} {{}} {{}} {{}}'.format(width=test_col_width) 547 547 if tests_to_skip: 548 print ''549 print 'Tests to skip ({})'.format(len(tests_to_skip))548 print('') 549 print('Tests to skip ({})'.format(len(tests_to_skip))) 550 550 for test in sorted(tests_to_skip): 551 551 self._print_expectation_line_for_test(format_string, test) 552 552 553 print ''554 print 'Tests to run{} ({})'.format(' for ' + device_class if device_class else '', len(tests_to_run))553 print('') 554 print('Tests to run{} ({})'.format(' for ' + device_class if device_class else '', len(tests_to_run))) 555 555 for test in sorted(tests_to_run): 556 556 self._print_expectation_line_for_test(format_string, test) -
trunk/Tools/Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py
r221869 r225698 69 69 70 70 if options.web_platform_test_server: 71 print "Starting web-platform-tests server on <%s> and <%s>" % (web_platform_test_server.base_http_url(port), web_platform_test_server.base_https_url(port))72 print "WebKit http/wpt tests are accessible at <%s>" % (web_platform_test_server.base_http_url(port) + "WebKit/")71 print("Starting web-platform-tests server on <%s> and <%s>" % (web_platform_test_server.base_http_url(port), web_platform_test_server.base_https_url(port))) 72 print("WebKit http/wpt tests are accessible at <%s>" % (web_platform_test_server.base_http_url(port) + "WebKit/")) 73 73 port.start_web_platform_test_server() 74 74 … … 77 77 http_port = options.http_port if options.http_port is not None else "8000" 78 78 if options.http_all_interfaces is not None: 79 print "Starting httpd on port %s (all interfaces)" % http_port79 print("Starting httpd on port %s (all interfaces)" % http_port) 80 80 else: 81 print "Starting httpd on <http://127.0.0.1:%s>" % http_port81 print("Starting httpd on <http://127.0.0.1:%s>" % http_port) 82 82 83 83 additionalDirs = {additional_dir[0]: additional_dir[1] for additional_dir in options.additional_dirs} … … 86 86 87 87 if options.url: 88 print "Opening %s" % options.url88 print("Opening %s" % options.url) 89 89 subprocess.Popen(['open', options.url], stdout=subprocess.PIPE) 90 90 -
trunk/Tools/Scripts/webkitpy/port/config_standalone.py
r140510 r225698 64 64 65 65 c = config.Config(e, fs) 66 print c.default_configuration()66 print(c.default_configuration()) 67 67 68 68 if __name__ == '__main__': -
trunk/Tools/Scripts/webkitpy/port/darwin_testcase.py
r217853 r225698 101 101 102 102 def logging_run_command(args): 103 print args103 print(args) 104 104 105 105 port = self.make_port() … … 116 116 if args[0] == '/usr/bin/sudo': 117 117 return 1 118 print args118 print(args) 119 119 return 0 120 120 -
trunk/Tools/Scripts/webkitpy/port/ios.py
r225229 r225698 191 191 raise 192 192 elif len(exception_list) > 1: 193 print '\n'193 print('\n') 194 194 for exception in exception_list: 195 195 _log.error('{} raised: {}'.format(exception[0].__class__.__name__, exception[0])) -
trunk/Tools/Scripts/webkitpy/port/ios_device_unittest.py
r221087 r225698 51 51 def test_spindump(self): 52 52 def logging_run_command(args): 53 print args53 print(args) 54 54 55 55 port = self.make_port() … … 65 65 if args[0] == '/usr/sbin/spindump': 66 66 return 1 67 print args67 print(args) 68 68 return 0 69 69 -
trunk/Tools/Scripts/webkitpy/port/ios_simulator_unittest.py
r221087 r225698 82 82 def test_xcrun(self): 83 83 def throwing_run_command(args): 84 print args84 print(args) 85 85 raise ScriptError("MOCK script error") 86 86 -
trunk/Tools/Scripts/webkitpy/port/leakdetector_unittest.py
r225496 r225698 128 128 129 129 def mock_run_script(name, args, include_configuration_arguments=False): 130 print "MOCK _run_script: %s %s" % (name, args)130 print("MOCK _run_script: %s %s" % (name, args)) 131 131 return """1 calls for 16 bytes: -[NSURLRequest mutableCopyWithZone:] | +[NSObject(NSObject) allocWithZone:] | _internal_class_createInstanceFromZone | calloc | malloc_zone_calloc 132 132 -
trunk/Tools/Scripts/webkitpy/port/mac_unittest.py
r224688 r225698 137 137 def test_xcrun(self): 138 138 def throwing_run_command(args): 139 print args139 print(args) 140 140 raise ScriptError("MOCK script error") 141 141 -
trunk/Tools/Scripts/webkitpy/style/checkers/contributors.py
r206967 r225698 46 46 if diff: 47 47 self._handle_style_error(0, 'json/syntax', 5, 'contributors.json differs from the canonical format. Use "validate-committer-lists --canonicalize" to reformat it.') 48 print diff48 print(diff) 49 49 50 50 def _unidiff_output(self, expected, actual): -
trunk/Tools/Scripts/webkitpy/tool/commands/abstractlocalservercommand.py
r148360 r225698 47 47 48 48 server_url = "http://localhost:%d%s" % (options.httpd_port, self.launch_path) 49 print "Starting server at %s" % server_url50 print "Use the 'Exit' link in the UI, %squitquitquit or Ctrl-C to stop" % server_url49 print("Starting server at %s" % server_url) 50 print("Use the 'Exit' link in the UI, %squitquitquit or Ctrl-C to stop" % server_url) 51 51 52 52 if options.show_results: -
trunk/Tools/Scripts/webkitpy/tool/commands/adduserstogroups.py
r148360 r225698 45 45 groups = tool.user.prompt_with_list(list_title, self.known_groups, can_choose_multiple=True) 46 46 if not groups: 47 print "No groups specified."47 print("No groups specified.") 48 48 return 49 49 50 50 login_userid_pairs = tool.bugs.queries.fetch_login_userid_pairs_matching_substring(search_string) 51 51 if not login_userid_pairs: 52 print "No users found matching '%s'" % search_string52 print("No users found matching '%s'" % search_string) 53 53 return 54 54 55 print "Found %s users matching %s:" % (len(login_userid_pairs), search_string)55 print("Found %s users matching %s:" % (len(login_userid_pairs), search_string)) 56 56 for (login, user_id) in login_userid_pairs: 57 print "%s (%s)" % (login, user_id)57 print("%s (%s)" % (login, user_id)) 58 58 59 59 confirm_message = "Are you sure you want add %s users to groups %s? (This action cannot be undone using webkit-patch.)" % (len(login_userid_pairs), groups) … … 62 62 63 63 for (login, user_id) in login_userid_pairs: 64 print "Adding %s to %s" % (login, groups)64 print("Adding %s to %s" % (login, groups)) 65 65 tool.bugs.add_user_to_groups(user_id, groups) -
trunk/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py
r150237 r225698 61 61 def _generate_jsons(filesystem, jsons, output_dir): 62 62 for filename in jsons: 63 print ' Generating', filename63 print(' Generating', filename) 64 64 filesystem.write_text_file(filesystem.join(output_dir, filename), json.dumps(jsons[filename], indent=2)) 65 65 … … 67 67 filesystem = self._tool.filesystem 68 68 if len(args) < 1 or not filesystem.exists(args[0]): 69 print "Need the directory name to look for changelog as the first argument"69 print("Need the directory name to look for changelog as the first argument") 70 70 return 71 71 changelog_dir = filesystem.abspath(args[0]) 72 72 73 73 if len(args) < 2 or not filesystem.exists(args[1]): 74 print "Need the output directory name as the second argument"74 print("Need the output directory name as the second argument") 75 75 return 76 76 output_dir = args[1] … … 78 78 startTime = time.time() 79 79 80 print 'Enumerating ChangeLog files...'80 print('Enumerating ChangeLog files...') 81 81 changelogs = AnalyzeChangeLog._enumerate_changelogs(filesystem, changelog_dir, options.changelog_count) 82 82 … … 84 84 analyzer.analyze() 85 85 86 print 'Generating json files...'86 print('Generating json files...') 87 87 json_files = { 88 88 'summary.json': analyzer.summary(), … … 92 92 AnalyzeChangeLog._generate_jsons(filesystem, json_files, output_dir) 93 93 commands_dir = filesystem.dirname(filesystem.path_to_module(self.__module__)) 94 print commands_dir94 print(commands_dir) 95 95 filesystem.copyfile(filesystem.join(commands_dir, 'data/summary.html'), filesystem.join(output_dir, 'summary.html')) 96 96 97 97 tick = time.time() - startTime 98 print 'Finished in %02dm:%02ds' % (int(tick / 60), int(tick % 60))98 print('Finished in %02dm:%02ds' % (int(tick / 60), int(tick % 60))) 99 99 100 100 … … 133 133 def _set_filename(self, filename): 134 134 if self._filename: 135 print 135 print() 136 136 self._filename = filename 137 137 … … 143 143 number_of_parsed_entries = self._analyze_entries(ChangeLog.parse_entries_from_file(changelog), path) 144 144 self._print_status('Done (%d entries)' % number_of_parsed_entries) 145 print 145 print() 146 146 self._summary['contributors'] = len(self._contributors_statistics) 147 147 self._summary['contributors_with_reviews'] = sum([1 for contributor in self._contributors_statistics.values() if contributor['reviews']['total']]) -
trunk/Tools/Scripts/webkitpy/tool/commands/bugfortest.py
r148360 r225698 44 44 if bug: 45 45 bug = reporter._follow_duplicate_chain(bug) 46 print "%5s %s" % (bug.id(), bug.title())46 print("%5s %s" % (bug.id(), bug.title())) 47 47 else: 48 print "No bugs found matching '%s'" % search_string48 print("No bugs found matching '%s'" % search_string) -
trunk/Tools/Scripts/webkitpy/tool/commands/bugsearch.py
r148360 r225698 45 45 bugs = tool.bugs.queries.fetch_bugs_matching_quicksearch(search_string) 46 46 for bug in bugs: 47 print "%5s %s" % (bug.id(), bug.title())47 print("%5s %s" % (bug.id(), bug.title())) 48 48 if not bugs: 49 print "No bugs found matching '%s'" % search_string49 print("No bugs found matching '%s'" % search_string) -
trunk/Tools/Scripts/webkitpy/tool/commands/findusers.py
r174385 r225698 40 40 users = CommitterList().contributors_by_search_string(search_string) 41 41 for user in users: 42 print user42 print(user) -
trunk/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py
r148502 r225698 40 40 41 41 def execute(self, options, args, tool): 42 print "This command runs a local HTTP server that changes your working copy"43 print "based on the actions you take in the web-based UI."42 print("This command runs a local HTTP server that changes your working copy") 43 print("based on the actions you take in the web-based UI.") 44 44 45 45 args = {} … … 56 56 self._tool.user.open_url(httpd.url(args)) 57 57 58 print "Local HTTP server started."58 print("Local HTTP server started.") 59 59 httpd.serve_forever() -
trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
r202319 r225698 195 195 def execute(self, options, args, tool): 196 196 self._rebaseline_test_and_update_expectations(options) 197 print json.dumps(self._scm_changes)197 print(json.dumps(self._scm_changes)) 198 198 199 199 -
trunk/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py
r160848 r225698 80 80 filesystem = host.filesystem 81 81 82 print 'Parsing full_results.json...'82 print('Parsing full_results.json...') 83 83 results_json_path = filesystem.join(results_directory, 'full_results.json') 84 84 results_json = json_results_generator.load_json(filesystem, results_json_path) … … 89 89 self._test_config = TestConfig(port, layout_tests_directory, results_directory, platforms, scm, host) 90 90 91 print 'Gathering current baselines...'91 print('Gathering current baselines...') 92 92 self._gather_baselines(results_json) 93 93 -
trunk/Tools/Scripts/webkitpy/tool/commands/setupgitclone.py
r219197 r225698 38 38 def execute(self, options, args, tool): 39 39 if not isinstance(tool.scm(), Git): 40 print "This command only works inside a Git checkout."40 print("This command only works inside a Git checkout.") 41 41 return 42 42 43 43 if tool.scm().has_working_directory_changes(): 44 print "There are local changes; aborting the command."44 print("There are local changes; aborting the command.") 45 45 return 46 46 … … 73 73 if tool.user.confirm("Do you want to append the git branch name to every build? (e.g. WebKitBuild/mybranch/; y/n)"): 74 74 run_git(["config", "core.webKitBranchBuild", "true"]) 75 print "You can override this option via git config branch.$branchName.webKitBranchBuild (true|false)"75 print("You can override this option via git config branch.$branchName.webKitBranchBuild (true|false)") 76 76 77 print "Done"77 print("Done") 78 78 79 79 def _get_username_and_email(self, tool): … … 96 96 # VCSUtils prints useful error messages on failure, we shouldn't hide these 97 97 if error.output: 98 print error.output98 print(error.output) 99 99 raise -
trunk/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py
r223177 r225698 256 256 # This is a little bit of a hack, but its convienent to just pass the nomination dictionary to the formating operator. 257 257 nomination['roles_string'] = grammar.join_with_separators(nomination['roles']).upper() 258 print "%(roles_string)s: %(author_name)s (%(author_email)s) has %(patch_count)s reviewed patches" % nomination258 print("%(roles_string)s: %(author_name)s (%(author_email)s) has %(patch_count)s reviewed patches" % nomination) 259 259 counter = counters_by_email[nomination['author_email']] 260 260 261 261 if self.show_commits: 262 print counter['commits']262 print(counter['commits']) 263 263 264 264 def _print_counts(self, counters_by_email): … … 289 289 alias_list.append(alias) 290 290 if alias_list: 291 print "CONTRIBUTOR: %s (%s) has %s %s" % (author_name, author_email, grammar.pluralize(patch_count, "reviewed patch"), "(aliases: " + ", ".join(alias_list) + ")")291 print("CONTRIBUTOR: %s (%s) has %s %s" % (author_name, author_email, grammar.pluralize(patch_count, "reviewed patch"), "(aliases: " + ", ".join(alias_list) + ")")) 292 292 else: 293 print "CONTRIBUTOR: %s (%s) has %s" % (author_name, author_email, grammar.pluralize(patch_count, "reviewed patch"))293 print("CONTRIBUTOR: %s (%s) has %s" % (author_name, author_email, grammar.pluralize(patch_count, "reviewed patch"))) 294 294 return 295 295 -
trunk/Tools/Scripts/webkitpy/tool/commands/upload.py
r221567 r225698 62 62 # This command is a useful test to make sure commit_message_for_this_commit 63 63 # always returns the right value regardless of the current working directory. 64 print "%s" % tool.checkout().commit_message_for_this_commit(options.git_commit).message()64 print("%s" % tool.checkout().commit_message_for_this_commit(options.git_commit).message()) 65 65 66 66 … … 511 511 bug_title = User.prompt("Bug title: ") 512 512 # FIXME: User should provide a function for doing this multi-line prompt. 513 print "Bug comment (hit ^D on blank line to end):"513 print("Bug comment (hit ^D on blank line to end):") 514 514 lines = sys.stdin.readlines() 515 515 try: -
trunk/Tools/Scripts/webkitpy/tool/multicommandtool.py
r215982 r225698 198 198 command = self._tool.command_by_name(args[0]) 199 199 if command: 200 print command.standalone_help()200 print(command.standalone_help()) 201 201 return 0 202 202 -
trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py
r174136 r225698 74 74 75 75 def _serve_text(self, text): 76 print "== Begin Response =="77 print text78 print "== End Response =="76 print("== Begin Response ==") 77 print(text) 78 print("== End Response ==") 79 79 80 80 def _serve_json(self, json_object): 81 print "== Begin JSON Response =="82 print json.dumps(json_object)83 print "== End JSON Response =="81 print("== Begin JSON Response ==") 82 print(json.dumps(json_object)) 83 print("== End JSON Response ==") 84 84 85 85 -
trunk/Tools/Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py
r135744 r225698 70 70 for filename in png_files: 71 71 if self._detector.exists(filename) and self._detector.propget('svn:mime-type', filename) != 'image/png': 72 print "Adding image/png mime-type to %s" % filename72 print("Adding image/png mime-type to %s" % filename) 73 73 self._detector.propset('svn:mime-type', 'image/png', filename) 74 74 -
trunk/Tools/Scripts/webkitpy/tool/steps/suggestreviewers.py
r143033 r225698 44 44 45 45 reviewers = self._tool.checkout().suggested_reviewers(self._options.git_commit, self._changed_files(state))[:5] 46 print "The following reviewers have recently modified files in your patch:"47 print ", ".join([reviewer.full_name for reviewer in reviewers])46 print("The following reviewers have recently modified files in your patch:") 47 print(", ".join([reviewer.full_name for reviewer in reviewers])) 48 48 49 49 if not state.get('bug_id'): -
trunk/Tools/Scripts/webkitpy/w3c/test_importer.py
r223273 r225698 530 530 for full_path in self._slow_tests: 531 531 w3c_test_path = self.filesystem.relpath(full_path, self.source_directory) 532 print w3c_test_path532 print(w3c_test_path) 533 533 # No need to mark tests as slow if they are in skipped directories 534 534 if self._already_identified_as_resource_file(w3c_test_path): -
trunk/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py
r225390 r225698 74 74 for test in tests: 75 75 test_name = os.path.relpath(test, self._tests_dir()) 76 print test_name76 print(test_name) 77 77 harness_result, test_results = executor.run(test, timeout) 78 78 result = WebDriverTestResult(test_name, *harness_result) -
trunk/Tools/TestResultServer/model/jsonresults_unittest.py
r157359 r225698 31 31 from jsonresults import JsonResults 32 32 except ImportError: 33 print "ERROR: Add the TestResultServer, google_appengine and yaml/lib directories to your PYTHONPATH"33 print("ERROR: Add the TestResultServer, google_appengine and yaml/lib directories to your PYTHONPATH") 34 34 raise 35 35 -
trunk/Tools/gtk/ycm_extra_conf.py
r225047 r225698 111 111 build_path = os.path.normpath(get_build_path()) 112 112 if not build_path: 113 print "Could not find WebKit build path."113 print("Could not find WebKit build path.") 114 114 return result 115 115 116 116 database = ycm_core.CompilationDatabase(build_path) 117 117 if not database: 118 print "Could not find compile_commands.json in %s, You might forget to add CMAKE_EXPORT_COMPILE_COMMANDS=ON to cmakeargs" % build_path118 print("Could not find compile_commands.json in %s, You might forget to add CMAKE_EXPORT_COMPILE_COMMANDS=ON to cmakeargs" % build_path) 119 119 return result 120 120 121 121 compilation_info = database.GetCompilationInfoForFile(filename) 122 122 if not compilation_info: 123 print "No compilation info."123 print("No compilation info.") 124 124 return result 125 125 … … 131 131 import sys 132 132 if len(sys.argv) >= 2: 133 print FlagsForFile(sys.argv[1])133 print(FlagsForFile(sys.argv[1])) -
trunk/Tools/lldb/lldb_webkit.py
r219637 r225698 131 131 132 132 if not annotateJSFrames: 133 print "Warning: Can't find JSC::ExecState::describeFrame() in executable to annotate JavaScript frames"133 print("Warning: Can't find JSC::ExecState::describeFrame() in executable to annotate JavaScript frames") 134 134 135 135 backtraceDepth = thread.GetNumFrames() … … 142 142 143 143 threadFormat = '* thread #{num}: tid = {tid:#x}, {pcAddr:' + addressFormat + '}, queue = \'{queueName}, stop reason = {stopReason}' 144 print threadFormat.format(num=thread.GetIndexID(), tid=thread.GetThreadID(), pcAddr=thread.GetFrameAtIndex(0).GetPC(), queueName=thread.GetQueueName(), stopReason=thread.GetStopDescription(30))144 print(threadFormat.format(num=thread.GetIndexID(), tid=thread.GetThreadID(), pcAddr=thread.GetFrameAtIndex(0).GetPC(), queueName=thread.GetQueueName(), stopReason=thread.GetStopDescription(30))) 145 145 146 146 for frame in thread: … … 162 162 JSFrameDescription = string.strip(JSFrameDescription, '"') 163 163 frameFormat = ' frame #{num}: {addr:' + addressFormat + '} {desc}' 164 print frameFormat.format(num=frame.GetFrameID(), addr=frame.GetPC(), desc=JSFrameDescription)164 print(frameFormat.format(num=frame.GetFrameID(), addr=frame.GetPC(), desc=JSFrameDescription)) 165 165 continue 166 print ' %s' % frame166 print(' %s' % frame) 167 167 168 168 # FIXME: Provide support for the following types:
Note: See TracChangeset
for help on using the changeset viewer.