WPT import: Change defaults for notifier-related variables.
Instead of initializing TestImporter's |rebaselined_tests| and |new_test_expectations| to None, initialize them to the types that ImportNotifier expects (an iterable and a dict, respectively). Using None causes the notification mechanisms to fail when a WPT import does not require any rebaseline changes, as TestImporter.fetch_new_expecations_and_baselines() is not called and we end up passing None to ImportNotifier.find_changed_baselines_of_tests() and ImportNotifier.examine_new_test_expectations(). From https://ci.chromium.org/buildbot/chromium.infra.cron/wpt-importer/7427: Traceback (most recent call last): File "/mnt/data/b/rr/tmpKoSTkX/w/src/third_party/WebKit/Tools/Scripts/wpt-import", line 25, in <module> main() File "/mnt/data/b/rr/tmpKoSTkX/w/src/third_party/WebKit/Tools/Scripts/wpt-import", line 18, in main host.exit(importer.main()) File "/mnt/data/b/rr/tmpKoSTkX/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py", line 168, in main if not self.send_notifications(local_wpt): File "/mnt/data/b/rr/tmpKoSTkX/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py", line 631, in send_notifications issue, patchset) File "/mnt/data/b/rr/tmpKoSTkX/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/import_notifier.py", line 60, in main changed_test_baselines = self.find_changed_baselines_of_tests(rebaselined_tests) File "/mnt/data/b/rr/tmpKoSTkX/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/import_notifier.py", line 78, in find_changed_baselines_of_tests for test_name in rebaselined_tests: TypeError: 'NoneType' object is not iterable Bug: 765334 Change-Id: I36195763226cd393312e80c8819aac546c7daef9 Reviewed-on: https://chromium-review.googlesource.com/819410Reviewed-by:Robert Ma <robertma@chromium.org> Reviewed-by:
Quinten Yearsley <qyearsley@chromium.org> Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/master@{#523111}
Showing
Please register or sign in to comment