mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-12 09:56:45 +02:00
LibTest: Add verbose test file output
Add -v/--verbose support to JavaScript test runners so they print each test file immediately before running it. This makes hard crashes and process traps easy to map back to the file that triggered them.
This commit is contained in:
committed by
Andreas Kling
parent
2222654db4
commit
6acc1d36ae
Notes:
github-actions[bot]
2026-05-03 11:12:48 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/6acc1d36aee Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/9220
@@ -102,6 +102,7 @@ int main(int argc, char** argv)
|
||||
bool print_progress = false;
|
||||
bool print_json = false;
|
||||
bool per_file = false;
|
||||
bool print_each_test = false;
|
||||
StringView specified_test_root;
|
||||
ByteString common_path;
|
||||
Vector<ByteString> test_globs;
|
||||
@@ -126,6 +127,7 @@ int main(int argc, char** argv)
|
||||
|
||||
args_parser.add_option(print_json, "Show results as JSON", "json", 'j');
|
||||
args_parser.add_option(per_file, "Show detailed per-file results as JSON (implies -j)", "per-file");
|
||||
args_parser.add_option(print_each_test, "Print each test file before running it", "verbose", 'v');
|
||||
args_parser.add_option(g_collect_on_every_allocation, "Collect garbage after every allocation", "collect-often", 'g');
|
||||
args_parser.add_option(JS::Bytecode::g_dump_bytecode, "Dump the bytecode", "dump-bytecode", 'd');
|
||||
args_parser.add_option(test_globs, "Only run tests matching the given glob", "filter", 'f', "glob");
|
||||
@@ -213,7 +215,7 @@ int main(int argc, char** argv)
|
||||
};
|
||||
}
|
||||
|
||||
Test::JS::TestRunner test_runner(test_root, common_path, print_times, print_progress, print_json, per_file);
|
||||
Test::JS::TestRunner test_runner(test_root, common_path, print_times, print_progress, print_json, per_file, print_each_test);
|
||||
test_runner.run(test_globs);
|
||||
|
||||
g_vm = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user