mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
headless-browser: Ensure crashing tests cause LibWeb tests to fail
This commit is contained in:
parent
ce56bc29e2
commit
25c067872c
Notes:
github-actions[bot]
2024-11-14 00:22:49 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/25c067872c2 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2326
1 changed files with 5 additions and 1 deletions
|
@ -437,6 +437,7 @@ ErrorOr<void> run_tests(Core::AnonymousBuffer const& theme, Web::DevicePixelSize
|
||||||
size_t timeout_count = 0;
|
size_t timeout_count = 0;
|
||||||
size_t crashed_count = 0;
|
size_t crashed_count = 0;
|
||||||
size_t skipped_count = 0;
|
size_t skipped_count = 0;
|
||||||
|
bool all_tests_ok = true;
|
||||||
|
|
||||||
bool is_tty = isatty(STDOUT_FILENO);
|
bool is_tty = isatty(STDOUT_FILENO);
|
||||||
outln("Running {} tests...", tests.size());
|
outln("Running {} tests...", tests.size());
|
||||||
|
@ -486,12 +487,15 @@ ErrorOr<void> run_tests(Core::AnonymousBuffer const& theme, Web::DevicePixelSize
|
||||||
++pass_count;
|
++pass_count;
|
||||||
break;
|
break;
|
||||||
case TestResult::Fail:
|
case TestResult::Fail:
|
||||||
|
all_tests_ok = false;
|
||||||
++fail_count;
|
++fail_count;
|
||||||
break;
|
break;
|
||||||
case TestResult::Timeout:
|
case TestResult::Timeout:
|
||||||
|
all_tests_ok = false;
|
||||||
++timeout_count;
|
++timeout_count;
|
||||||
break;
|
break;
|
||||||
case TestResult::Crashed:
|
case TestResult::Crashed:
|
||||||
|
all_tests_ok = false;
|
||||||
++crashed_count;
|
++crashed_count;
|
||||||
break;
|
break;
|
||||||
case TestResult::Skipped:
|
case TestResult::Skipped:
|
||||||
|
@ -558,7 +562,7 @@ ErrorOr<void> run_tests(Core::AnonymousBuffer const& theme, Web::DevicePixelSize
|
||||||
|
|
||||||
app.destroy_web_views();
|
app.destroy_web_views();
|
||||||
|
|
||||||
if (timeout_count == 0 && fail_count == 0)
|
if (all_tests_ok)
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
return Error::from_string_literal("Failed LibWeb tests");
|
return Error::from_string_literal("Failed LibWeb tests");
|
||||||
|
|
Loading…
Reference in a new issue