mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 21:26:22 +00:00
test-web: Add an option to randomize the test order
This commit is contained in:
parent
d322c3a21f
commit
168ea88cb2
Notes:
github-actions[bot]
2025-07-28 07:03:04 +00:00
Author: https://github.com/tcl3
Commit: 168ea88cb2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5619
Reviewed-by: https://github.com/gmta ✅
3 changed files with 5 additions and 0 deletions
|
@ -38,6 +38,7 @@ void Application::create_platform_arguments(Core::ArgsParser& args_parser)
|
||||||
args_parser.add_option(dump_gc_graph, "Dump GC graph", "dump-gc-graph", 'G');
|
args_parser.add_option(dump_gc_graph, "Dump GC graph", "dump-gc-graph", 'G');
|
||||||
args_parser.add_option(test_dry_run, "List the tests that would be run, without running them", "dry-run");
|
args_parser.add_option(test_dry_run, "List the tests that would be run, without running them", "dry-run");
|
||||||
args_parser.add_option(rebaseline, "Rebaseline any executed layout or text tests", "rebaseline");
|
args_parser.add_option(rebaseline, "Rebaseline any executed layout or text tests", "rebaseline");
|
||||||
|
args_parser.add_option(shuffle, "Shuffle the order of tests before running them", "shuffle", 's');
|
||||||
args_parser.add_option(per_test_timeout_in_seconds, "Per-test timeout (default: 30)", "per-test-timeout", 't', "seconds");
|
args_parser.add_option(per_test_timeout_in_seconds, "Per-test timeout (default: 30)", "per-test-timeout", 't', "seconds");
|
||||||
|
|
||||||
args_parser.add_option(Core::ArgsParser::Option {
|
args_parser.add_option(Core::ArgsParser::Option {
|
||||||
|
|
|
@ -40,6 +40,7 @@ public:
|
||||||
|
|
||||||
bool test_dry_run { false };
|
bool test_dry_run { false };
|
||||||
bool rebaseline { false };
|
bool rebaseline { false };
|
||||||
|
bool shuffle { false };
|
||||||
|
|
||||||
int per_test_timeout_in_seconds { 30 };
|
int per_test_timeout_in_seconds { 30 };
|
||||||
|
|
||||||
|
|
|
@ -612,6 +612,9 @@ static ErrorOr<int> run_tests(Core::AnonymousBuffer const& theme, Web::DevicePix
|
||||||
return is_support_file || !match_glob;
|
return is_support_file || !match_glob;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (app.shuffle)
|
||||||
|
shuffle(tests);
|
||||||
|
|
||||||
if (app.test_dry_run) {
|
if (app.test_dry_run) {
|
||||||
outln("Found {} tests...", tests.size());
|
outln("Found {} tests...", tests.size());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue