Changeset 225724 in webkit
- Timestamp:
- Dec 9, 2017 8:58:36 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r225709 r225724 1 2017-12-09 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=180611 5 6 Reviewed by Michael Catanzaro. 7 8 * Scripts/make-js-file-arrays.py: 9 (main): 10 1 11 2017-12-08 Joseph Pecoraro <pecoraro@apple.com> 2 12 -
trunk/Source/JavaScriptCore/Scripts/make-js-file-arrays.py
r225698 r225724 22 22 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 23 24 from __future__ import print_function 24 25 import io 25 26 import os … … 61 62 62 63 headerFile = open(headerPath, 'w') 63 print >> headerFile, 'namespace {0:s} {{'.format(namespace)64 print('namespace {0:s} {{'.format(namespace), file=headerFile) 64 65 65 66 sourceFile = open(sourcePath, 'w') 66 print >> sourceFile, '#include "{0:s}"'.format(os.path.basename(headerPath))67 print >> sourceFile, 'namespace {0:s} {{'.format(namespace)67 print('#include "{0:s}"'.format(os.path.basename(headerPath)), file=sourceFile) 68 print('namespace {0:s} {{'.format(namespace), file=sourceFile) 68 69 69 70 jsm = JavascriptMinify() … … 82 83 variableName = os.path.splitext(os.path.basename(inputFileName))[0] 83 84 84 print >> headerFile, 'extern const char {0:s}JavaScript[{1:d}];'.format(variableName, size)85 print >> sourceFile, 'const char {0:s}JavaScript[{1:d}] = {{'.format(variableName, size)85 print('extern const char {0:s}JavaScript[{1:d}];'.format(variableName, size), file=headerFile) 86 print('const char {0:s}JavaScript[{1:d}] = {{'.format(variableName, size), file=sourceFile) 86 87 87 88 codepoints = map(ord, characters) 88 89 for codepointChunk in chunk(codepoints, 16): 89 print >> sourceFile, ' {0:s},'.format(','.join(map(stringifyCodepoint, codepointChunk)))90 print(' {0:s},'.format(','.join(map(stringifyCodepoint, codepointChunk))), file=sourceFile) 90 91 91 print >> sourceFile, '};'92 print('};', file=sourceFile) 92 93 93 print >> headerFile, '}} // namespace {0:s}'.format(namespace)94 print >> sourceFile, '}} // namespace {0:s}'.format(namespace)94 print('}} // namespace {0:s}'.format(namespace), file=headerFile) 95 print('}} // namespace {0:s}'.format(namespace), file=sourceFile) 95 96 96 97 if __name__ == '__main__': -
trunk/Tools/ChangeLog
r225722 r225724 1 2017-12-09 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=180611 5 6 Reviewed by Michael Catanzaro. 7 8 * CygwinDownloader/cygwin-downloader.py: 9 (download_url_to_file): 10 * Scripts/webkitpy/common/system/profiler.py: 11 (Perf.profile_after_exit): 12 * Scripts/webkitpy/common/version_check.py: 13 * Scripts/webkitpy/layout_tests/lint_test_expectations.py: 14 (main): 15 * Scripts/webkitpy/layout_tests/run_webkit_tests.py: 16 (main): 17 * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py: 18 (run_server): 19 * Scripts/webkitpy/tool/commands/analyzechangelog.py: 20 (ChangeLogAnalyzer._print_status): 21 * Scripts/webkitpy/tool/commands/queries.py: 22 (BugsToCommit.execute): 23 (PatchesInCommitQueue.execute): 24 (PatchesToCommitQueue.execute): 25 (PatchesToReview._print_report): 26 (WhatBroke._print_builder_line): 27 (WhatBroke._print_blame_information_for_builder): 28 (WhatBroke.execute): 29 (ResultsFor._print_layout_test_results): 30 (ResultsFor.execute): 31 (FailureReason._print_blame_information_for_transition): 32 (FailureReason._explain_failures_for_builder): 33 (FailureReason._builder_to_explain): 34 (FailureReason.execute): 35 (FindFlakyTests._find_failures): 36 (FindFlakyTests._print_statistics): 37 (FindFlakyTests._walk_backwards_from): 38 (execute): 39 (PrintExpectations.execute): 40 (PrintBaselines.execute): 41 (PrintBaselines._print_baselines): 42 (FindResolvedBugs.execute): 43 * Scripts/webkitpy/tool/commands/rebaseline.py: 44 (AbstractParallelRebaselineCommand._run_webkit_patch): 45 (AbstractParallelRebaselineCommand._rebaseline): 46 * Scripts/webkitpy/tool/servers/gardeningserver.py: 47 (GardeningHTTPRequestHandler.rebaselineall): 48 * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py: 49 (GardeningServerTest.disabled_test_rebaselineall.run_command): 50 (GardeningServerTest): 51 1 52 2017-12-08 Basuke Suzuki <Basuke.Suzuki@sony.com> 2 53 -
trunk/Tools/CygwinDownloader/cygwin-downloader.py
r167430 r225724 1 1 #!/usr/bin/env python 2 2 3 from __future__ import print_function 3 4 import os, random, sys, time, urllib 4 5 … … 22 23 def download_url_to_file(url, file, message): 23 24 if not quiet: 24 print message + " ",25 print(message + " ", end=' ') 25 26 if not dry_run: 26 27 dir = os.path.dirname(file) … … 29 30 urllib.urlretrieve(url, file, download_progress_hook) 30 31 if not quiet: 31 print 32 print() 32 33 33 34 # This is mostly just the list of North America http mirrors from http://cygwin.com/mirrors.html, … … 80 81 # 81 82 82 print "Using Cygwin mirror server " + package_mirror_url + " to download setup.ini..."83 print("Using Cygwin mirror server " + package_mirror_url + " to download setup.ini...") 83 84 84 85 urllib.urlretrieve(package_mirror_url + "x86/setup.ini", "setup.ini.orig") … … 151 152 seconds_to_sleep = 10 152 153 153 print 154 print(""" 154 155 Finished downloading Cygwin. In %d seconds, 155 156 I will run setup.exe. All the suitable options have 156 157 been already selected for you. 157 """ % (seconds_to_sleep) 158 """ % (seconds_to_sleep)) 158 159 159 160 160 161 while seconds_to_sleep > 0: 161 print "%d..." % seconds_to_sleep,162 print("%d..." % seconds_to_sleep, end=' ') 162 163 sys.stdout.flush() 163 164 time.sleep(1) 164 165 seconds_to_sleep -= 1 165 print 166 print() 166 167 167 168 if not dry_run: -
trunk/Tools/Scripts/webkitpy/common/system/profiler.py
r225698 r225724 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 from __future__ import print_function 29 30 import logging 30 31 import re … … 170 171 exit_code = self._wait_process.poll() 171 172 if exit_code is not 0: 172 print "'perf record' failed, ",173 print("'perf record' failed, ", end=' ') 173 174 if exit_code: 174 175 print("exit code was %i." % exit_code) -
trunk/Tools/Scripts/webkitpy/common/version_check.py
r174102 r225724 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 from __future__ import print_function 29 30 import sys 30 31 31 32 if sys.version < '2.7' or sys.version >= '2.8': 32 print >> sys.stderr, "Unsupported Python version: WebKit only supports 2.7.x, and you're running %s." % sys.version.split()[0]33 print("Unsupported Python version: WebKit only supports 2.7.x, and you're running %s." % sys.version.split()[0], file=sys.stderr) 33 34 sys.exit(1) -
trunk/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py
r160756 r225724 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 from __future__ import print_function 29 30 import logging 30 31 import optparse … … 106 107 exit_status = INTERRUPTED_EXIT_STATUS 107 108 except Exception as e: 108 print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e))109 print('\n%s raised: %s' % (e.__class__.__name__, str(e)), file=stderr) 109 110 traceback.print_exc(file=stderr) 110 111 exit_status = EXCEPTIONAL_EXIT_STATUS -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r223765 r225724 29 29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 30 31 from __future__ import print_function 31 32 import logging 32 33 import optparse … … 71 72 except NotImplementedError, e: 72 73 # FIXME: is this the best way to handle unsupported port names? 73 print >> stderr, str(e)74 print(str(e), file=stderr) 74 75 return EXCEPTIONAL_EXIT_STATUS 75 76 … … 93 94 except BaseException as e: 94 95 if isinstance(e, Exception): 95 print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e))96 print('\n%s raised: %s' % (e.__class__.__name__, str(e)), file=stderr) 96 97 traceback.print_exc(file=stderr) 97 98 return EXCEPTIONAL_EXIT_STATUS -
trunk/Tools/Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py
r225698 r225724 29 29 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 30 31 from __future__ import print_function 31 32 import optparse 32 33 import subprocess … … 65 66 port = host.port_factory.get(options.platform, options) 66 67 except NotImplementedError, e: 67 print >> stderr, str(e)68 print(str(e), file=stderr) 68 69 return EXCEPTIONAL_EXIT_STATUS 69 70 -
trunk/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py
r225698 r225724 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 from __future__ import print_function 29 30 import json 30 31 import re … … 126 127 def _print_status(self, status): 127 128 if self._length_of_previous_output: 128 print "\r" + " " * self._length_of_previous_output,129 print("\r" + " " * self._length_of_previous_output, end=' ') 129 130 new_output = ('%' + str(self._longest_filename) + 's: %s') % (self._filename, status) 130 print "\r" + new_output,131 print("\r" + new_output, end=' ') 131 132 self._length_of_previous_output = len(new_output) 132 133 -
trunk/Tools/Scripts/webkitpy/tool/commands/queries.py
r216776 r225724 30 30 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 31 32 from __future__ import print_function 32 33 import fnmatch 33 34 import logging … … 75 76 bug_ids = tool.bugs.queries.fetch_bug_ids_from_commit_queue() 76 77 for bug_id in bug_ids: 77 print "%s" % bug_id78 print("%s" % bug_id) 78 79 79 80 … … 86 87 _log.info("Patches in commit queue:") 87 88 for patch in patches: 88 print patch.url()89 print(patch.url()) 89 90 90 91 … … 118 119 bugs_needing_cq = sorted(set(bugs_needing_cq)) 119 120 for bug_id in bugs_needing_cq: 120 print "%s" % tool.bugs.bug_url_for_bug_id(bug_id)121 print("%s" % tool.bugs.bug_url_for_bug_id(bug_id)) 121 122 else: 122 123 for patch in patches_needing_cq: 123 print "%s" % tool.bugs.attachment_url_for_id(patch.id(), action="edit")124 print("%s" % tool.bugs.attachment_url_for_id(patch.id(), action="edit")) 124 125 125 126 … … 141 142 def _print_report(self, report, cc_email, print_all): 142 143 if print_all: 143 print "Bugs with attachments pending review:"144 print("Bugs with attachments pending review:") 144 145 else: 145 print "Bugs with attachments pending review that has %s in the CC list:" % cc_email146 147 print "http://webkit.org/b/bugid Description (age in days)"146 print("Bugs with attachments pending review that has %s in the CC list:" % cc_email) 147 148 print("http://webkit.org/b/bugid Description (age in days)") 148 149 for row in report: 149 print "%s (%d)" % (row[1], row[0])150 151 print "Total: %d" % len(report)150 print("%s (%d)" % (row[1], row[0])) 151 152 print("Total: %d" % len(report)) 152 153 153 154 def _generate_report(self, bugs, include_cq_denied): … … 183 184 184 185 def _print_builder_line(self, builder_name, max_name_width, status_message): 185 print "%s : %s" % (builder_name.ljust(max_name_width), status_message)186 print("%s : %s" % (builder_name.ljust(max_name_width), status_message)) 186 187 187 188 def _print_blame_information_for_builder(self, builder_status, name_width, avoid_flakey_tests=True): … … 204 205 commit_info = self._tool.checkout().commit_info_for_revision(revision) 205 206 if commit_info: 206 print commit_info.blame_string(self._tool.bugs)207 print(commit_info.blame_string(self._tool.bugs)) 207 208 else: 208 print "FAILED to fetch CommitInfo for r%s, likely missing ChangeLog" % revision209 print("FAILED to fetch CommitInfo for r%s, likely missing ChangeLog" % revision) 209 210 210 211 def execute(self, options, args, tool): … … 219 220 failing_builders += 1 220 221 if failing_builders: 221 print "%s of %s are failing" % (failing_builders, pluralize(len(builder_statuses), "builder"))222 print("%s of %s are failing" % (failing_builders, pluralize(len(builder_statuses), "builder"))) 222 223 else: 223 print "All builders are passing!"224 print("All builders are passing!") 224 225 225 226 … … 231 232 def _print_layout_test_results(self, results): 232 233 if not results: 233 print " No results."234 print(" No results.") 234 235 return 235 236 for title, files in results.parsed_results().items(): 236 print " %s" % title237 print(" %s" % title) 237 238 for filename in files: 238 print " %s" % filename239 print(" %s" % filename) 239 240 240 241 def execute(self, options, args, tool): 241 242 builders = self._tool.buildbot.builders() 242 243 for builder in builders: 243 print "%s:" % builder.name()244 print("%s:" % builder.name()) 244 245 build = builder.build_for_revision(args[0], allow_failed_lookups=True) 245 246 self._print_layout_test_results(build.layout_test_results()) … … 262 263 def _print_blame_information_for_transition(self, regression_window, failing_tests): 263 264 red_build = regression_window.failing_build() 264 print "SUCCESS: Build %s (r%s) was the first to show failures: %s" % (red_build._number, red_build.revision(), failing_tests)265 print "Suspect revisions:"265 print("SUCCESS: Build %s (r%s) was the first to show failures: %s" % (red_build._number, red_build.revision(), failing_tests)) 266 print("Suspect revisions:") 266 267 for revision in regression_window.revisions(): 267 print self._blame_line_for_revision(revision)268 print(self._blame_line_for_revision(revision)) 268 269 269 270 def _explain_failures_for_builder(self, builder, start_revision): 270 print "Examining failures for \"%s\", starting at r%s" % (builder.name(), start_revision)271 print("Examining failures for \"%s\", starting at r%s" % (builder.name(), start_revision)) 271 272 revision_to_test = start_revision 272 273 build = builder.build_for_revision(revision_to_test, allow_failed_lookups=True) … … 274 275 if not layout_test_results: 275 276 # FIXME: This could be made more user friendly. 276 print "Failed to load layout test results from %s; can't continue. (start revision = r%s)" % (build.results_url(), start_revision)277 print("Failed to load layout test results from %s; can't continue. (start revision = r%s)" % (build.results_url(), start_revision)) 277 278 return 1 278 279 279 280 results_to_explain = set(layout_test_results.failing_tests()) 280 281 last_build_with_results = build 281 print "Starting at %s" % revision_to_test282 print("Starting at %s" % revision_to_test) 282 283 while results_to_explain and not self._done_explaining(): 283 284 revision_to_test -= 1 284 285 new_build = builder.build_for_revision(revision_to_test, allow_failed_lookups=True) 285 286 if not new_build: 286 print "No build for %s" % revision_to_test287 print("No build for %s" % revision_to_test) 287 288 continue 288 289 build = new_build 289 290 latest_results = build.layout_test_results() 290 291 if not latest_results: 291 print "No results build %s (r%s)" % (build._number, build.revision())292 print("No results build %s (r%s)" % (build._number, build.revision())) 292 293 continue 293 294 failures = set(latest_results.failing_tests()) … … 295 296 # FIXME: We may need to move this logic into the LayoutTestResults class. 296 297 # The buildbot stops runs after 500 failures so we don't have full results to work with here. 297 print "Too many failures in build %s (r%s), ignoring." % (build._number, build.revision())298 print("Too many failures in build %s (r%s), ignoring." % (build._number, build.revision())) 298 299 continue 299 300 fixed_results = results_to_explain - failures 300 301 if not fixed_results: 301 print "No change in build %s (r%s), %s unexplained failures (%s in this build)" % (build._number, build.revision(), len(results_to_explain), len(failures))302 print("No change in build %s (r%s), %s unexplained failures (%s in this build)" % (build._number, build.revision(), len(results_to_explain), len(failures))) 302 303 last_build_with_results = build 303 304 continue … … 308 309 results_to_explain -= fixed_results 309 310 if results_to_explain: 310 print "Failed to explain failures: %s" % results_to_explain311 print("Failed to explain failures: %s" % results_to_explain) 311 312 return 1 312 print "Explained all results for %s" % builder.name()313 print("Explained all results for %s" % builder.name()) 313 314 return 0 314 315 … … 316 317 builder_statuses = self._tool.buildbot.builder_statuses() 317 318 red_statuses = [status for status in builder_statuses if not status["is_green"]] 318 print "%s failing" % (pluralize(len(red_statuses), "builder"))319 print("%s failing" % (pluralize(len(red_statuses), "builder"))) 319 320 builder_choices = [status["name"] for status in red_statuses] 320 321 # We could offer an "All" choice here. … … 337 338 self.explained_failures = set() 338 339 if not start_revision: 339 print "Revision required."340 print("Revision required.") 340 341 return 1 341 342 return self._explain_failures_for_builder(builder, start_revision=int(start_revision)) … … 349 350 build = builder.build_for_revision(revision, allow_failed_lookups=True) 350 351 if not build: 351 print "No build for %s" % revision352 print("No build for %s" % revision) 352 353 return (None, None) 353 354 results = build.layout_test_results() 354 355 if not results: 355 print "No results build %s (r%s)" % (build._number, build.revision())356 print("No results build %s (r%s)" % (build._number, build.revision())) 356 357 return (None, None) 357 358 failures = set(results.failing_tests()) … … 359 360 # FIXME: We may need to move this logic into the LayoutTestResults class. 360 361 # The buildbot stops runs after 20 failures so we don't have full results to work with here. 361 print "Too many failures in build %s (r%s), ignoring." % (build._number, build.revision())362 print("Too many failures in build %s (r%s), ignoring." % (build._number, build.revision())) 362 363 return (None, None) 363 364 return (build, failures) … … 369 370 370 371 def _print_statistics(self, statistics): 371 print "=== Results ==="372 print "Occurrences Test name"372 print("=== Results ===") 373 print("Occurrences Test name") 373 374 for value, key in sorted([(value, key) for key, value in statistics.items()]): 374 print "%10d %s" % (value, key)375 print("%10d %s" % (value, key)) 375 376 376 377 def _walk_backwards_from(self, builder, start_revision, limit): … … 381 382 for i in range(limit): 382 383 revision = start_revision - i 383 print "Analyzing %s ... " % revision,384 print("Analyzing %s ... " % revision, end=' ') 384 385 (build, failures) = self._find_failures(builder, revision) 385 386 if failures == None: 386 387 # Notice that we don't loop on the empty set! 387 388 continue 388 print "has %s failures" % len(failures)389 print("has %s failures" % len(failures)) 389 390 flaky_tests = one_time_previous_failures - failures 390 391 if flaky_tests: 391 print 392 previous_build.results_url()) 392 print("Flaky tests: %s %s" % (sorted(flaky_tests), 393 previous_build.results_url())) 393 394 self._increment_statistics(flaky_tests, flaky_test_statistics) 394 395 one_time_previous_failures = failures - all_previous_failures … … 420 421 for builder in tool.buildbot.builder_statuses(): 421 422 status_string = "ok" if builder["is_green"] else "FAIL" 422 print "%s : %s" % (status_string.ljust(4), builder["name"])423 print("%s : %s" % (status_string.ljust(4), builder["name"])) 423 424 424 425 … … 436 437 if len(args) > 1: 437 438 pid = int(args[1]) 438 print crash_logs.find_newest_log(args[0], pid)439 print(crash_logs.find_newest_log(args[0], pid)) 439 440 440 441 … … 464 465 def execute(self, options, args, tool): 465 466 if not options.paths and not args and not options.all: 466 print "You must either specify one or more test paths or --all."467 print("You must either specify one or more test paths or --all.") 467 468 return 468 469 … … 474 475 port_names = [default_port.name()] 475 476 else: 476 print "No port names match '%s'" % options.platform477 print("No port names match '%s'" % options.platform) 477 478 return 478 479 else: … … 488 489 if file.startswith(layout_tests_dir): 489 490 file = file.replace(layout_tests_dir, 'LayoutTests') 490 print file491 print(file) 491 492 return 492 493 … … 497 498 lines = [model.get_expectation_line(test) for test in sorted(tests_to_print)] 498 499 if port_name != port_names[0]: 499 print 500 print '\n'.join(self._format_lines(options, port_name, lines))500 print() 501 print('\n'.join(self._format_lines(options, port_name, lines))) 501 502 502 503 def _filter_tests(self, options, model, tests): … … 548 549 def execute(self, options, args, tool): 549 550 if not args and not options.all: 550 print "You must either specify one or more test paths or --all."551 print("You must either specify one or more test paths or --all.") 551 552 return 552 553 … … 555 556 port_names = fnmatch.filter(tool.port_factory.all_port_names(), options.platform) 556 557 if not port_names: 557 print "No port names match '%s'" % options.platform558 print("No port names match '%s'" % options.platform) 558 559 else: 559 560 port_names = [default_port.name()] … … 564 565 for port_name in port_names: 565 566 if port_name != port_names[0]: 566 print 567 print() 567 568 if not options.csv: 568 print "// For %s" % port_name569 print("// For %s" % port_name) 569 570 port = tool.port_factory.get(port_name) 570 571 for test_name in tests: … … 576 577 if baseline_location: 577 578 if options.csv: 578 print 579 extension[1:], baseline_location, self._platform_for_path(baseline_location)) 579 print("%s,%s,%s,%s,%s,%s" % (port_name, test_name, self._platform_for_path(test_name), 580 extension[1:], baseline_location, self._platform_for_path(baseline_location))) 580 581 else: 581 print baseline_location582 print(baseline_location) 582 583 583 584 def _platform_for_path(self, relpath): … … 596 597 filename = args[0] 597 598 if not tool.filesystem.isfile(filename): 598 print "The given path is not a file, please pass a valid path."599 print("The given path is not a file, please pass a valid path.") 599 600 return 600 601 … … 612 613 for i, bugid in enumerate(ids, start=1): 613 614 bug = bugzilla.fetch_bug(bugid) 614 print "Checking bug %s \t [%d/%d]" % (bugid, i, num_of_bugs)615 print("Checking bug %s \t [%d/%d]" % (bugid, i, num_of_bugs)) 615 616 if not bug.is_open(): 616 617 resolved_ids.add(bugid) 617 618 618 print "Resolved bugs in %s :" % (filename)619 print("Resolved bugs in %s :" % (filename)) 619 620 for bugid in resolved_ids: 620 print "https://bugs.webkit.org/show_bug.cgi?id=%s" % (bugid)621 print("https://bugs.webkit.org/show_bug.cgi?id=%s" % (bugid)) -
trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
r225698 r225724 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 from __future__ import print_function 29 30 import json 30 31 import logging … … 206 207 stderr = self._tool.executive.run_command([self._tool.path()] + verbose_args + args, cwd=self._tool.scm().checkout_root, return_stderr=True) 207 208 for line in stderr.splitlines(): 208 print >> sys.stderr, line209 print(line, file=sys.stderr) 209 210 except ScriptError, e: 210 211 _log.error(e) … … 280 281 for line in log_output.split('\n'): 281 282 if line: 282 print >> sys.stderr, line# FIXME: Figure out how to log properly.283 print(line, file=sys.stderr) # FIXME: Figure out how to log properly. 283 284 284 285 files_to_add = self._files_to_add(command_results) -
trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py
r148502 r225724 23 23 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 25 from __future__ import print_function 25 26 import BaseHTTPServer 26 27 import SocketServer … … 95 96 _log.debug("calling %s, input='%s'", command, json_input) 96 97 return_code, output, error = self._run_webkit_patch(command, json_input) 97 print >> sys.stderr, error98 print(error, file=sys.stderr) 98 99 if return_code: 99 100 _log.error("rebaseline-json failed: %d, output='%s'" % (return_code, output)) -
trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py
r225698 r225724 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 from __future__ import print_function 29 30 import json 30 31 import sys … … 104 105 105 106 def run_command(args, cwd=None, input=None, **kwargs): 106 print >> sys.stderr, "MOCK run_command: %s, cwd=%s, input=%s" % (args, cwd, input)107 print("MOCK run_command: %s, cwd=%s, input=%s" % (args, cwd, input), file=sys.stderr) 107 108 return self.output.pop(0) 108 109
Note: See TracChangeset
for help on using the changeset viewer.