| OLD | NEW |
| 1 from __future__ import print_function | 1 from __future__ import print_function |
| 2 | 2 |
| 3 import argparse | 3 import argparse |
| 4 import json | 4 import json |
| 5 import logging | 5 import logging |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 import stat | 8 import stat |
| 9 import subprocess | 9 import subprocess |
| 10 import sys | 10 import sys |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 baseurl = "http://w3c-test.org/submissions" | 529 baseurl = "http://w3c-test.org/submissions" |
| 530 if "https" in os.path.splitext(test)[0].split(".")[1:]: | 530 if "https" in os.path.splitext(test)[0].split(".")[1:]: |
| 531 baseurl = "https://w3c-test.org/submissions" | 531 baseurl = "https://w3c-test.org/submissions" |
| 532 pr_number = None | 532 pr_number = None |
| 533 if comment_pr: | 533 if comment_pr: |
| 534 try: | 534 try: |
| 535 pr_number = int(comment_pr) | 535 pr_number = int(comment_pr) |
| 536 except ValueError: | 536 except ValueError: |
| 537 pass | 537 pass |
| 538 if pr_number: | 538 if pr_number: |
| 539 logger.info("### [%s](%s/%s%s) ###" % (test, baseurl, pr_number, tes
t)) | 539 logger.info("<details>\n") |
| 540 logger.info('<summary><a href="%s/%s%s">%s</a></summary>\n\n' % |
| 541 (baseurl, pr_number, test, test)) |
| 540 else: | 542 else: |
| 541 logger.info("### %s ###" % test) | 543 logger.info("### %s ###" % test) |
| 542 parent = test_results.pop(None) | 544 parent = test_results.pop(None) |
| 543 strings = [("", err_string(parent, iterations))] | 545 strings = [("", err_string(parent, iterations))] |
| 544 strings.extend(((("`%s`" % markdown_adjust(subtest)) if subtest else "",
err_string(results, iterations)) | 546 strings.extend(((("`%s`" % markdown_adjust(subtest)) if subtest |
| 547 else "", err_string(results, iterations)) |
| 545 for subtest, results in test_results.iteritems())) | 548 for subtest, results in test_results.iteritems())) |
| 546 table(["Subtest", "Results"], strings, logger.info) | 549 table(["Subtest", "Results"], strings, logger.info) |
| 550 if pr_number: |
| 551 logger.info("</details>\n") |
| 547 | 552 |
| 548 | 553 |
| 549 def get_parser(): | 554 def get_parser(): |
| 550 parser = argparse.ArgumentParser() | 555 parser = argparse.ArgumentParser() |
| 551 parser.add_argument("--root", | 556 parser.add_argument("--root", |
| 552 action="store", | 557 action="store", |
| 553 default=os.path.join(os.path.expanduser("~"), "build"), | 558 default=os.path.join(os.path.expanduser("~"), "build"), |
| 554 help="Root path") | 559 help="Root path") |
| 555 parser.add_argument("--iterations", | 560 parser.add_argument("--iterations", |
| 556 action="store", | 561 action="store", |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 return retcode | 678 return retcode |
| 674 | 679 |
| 675 | 680 |
| 676 if __name__ == "__main__": | 681 if __name__ == "__main__": |
| 677 try: | 682 try: |
| 678 retcode = main() | 683 retcode = main() |
| 679 except: | 684 except: |
| 680 raise | 685 raise |
| 681 else: | 686 else: |
| 682 sys.exit(retcode) | 687 sys.exit(retcode) |
| OLD | NEW |