mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
headless-browser: Early-out with an error if no tests are found
Previously this would just hang - I assume because the `all_tests_complete` promise could never get resolved without any tests running.
This commit is contained in:
parent
64308c8c06
commit
6114e69a53
Notes:
github-actions[bot]
2024-10-14 15:56:38 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/6114e69a53b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1793 Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 6 additions and 0 deletions
|
@ -392,6 +392,12 @@ ErrorOr<void> run_tests(Core::AnonymousBuffer const& theme, Gfx::IntSize window_
|
|||
return {};
|
||||
}
|
||||
|
||||
if (tests.is_empty()) {
|
||||
if (app.test_glob.is_empty())
|
||||
return Error::from_string_literal("No tests found");
|
||||
return Error::from_string_literal("No tests found matching filter");
|
||||
}
|
||||
|
||||
auto concurrency = min(app.test_concurrency, tests.size());
|
||||
size_t loaded_web_views = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue