Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e081edf2cd1304ad8c7b521f4def4ee87508e9ad
      
https://github.com/WebKit/WebKit/commit/e081edf2cd1304ad8c7b521f4def4ee87508e9ad
  Author: Issac Roy <[email protected]>
  Date:   2026-06-30 (Tue, 30 Jun 2026)

  Changed paths:
    M Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
    M Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py

  Log Message:
  -----------
  [Scripts] --print-expectations fails when no tests match
https://bugs.webkit.org/show_bug.cgi?id=294566
rdar://153547585

Reviewed by Sam Sneddon.

When --print-expectations is passed a path that matches no tests, _collect_tests
returns empty sets and aggregate_tests is empty. The call to max() over an empty
generator then raises ValueError. Guard against this by skipping to the next
driver iteration when no tests are found, matching the behavior of run() which
also short-circuits on an empty test set.

* Tools/Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.print_expectations): Guard against ValueError when no tests are found.
* Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
(test_print_expectations_no_tests_found): Added test for the case when no tests
are found.

Canonical link: https://commits.webkit.org/316162@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to