headless-browser: Ensure test path is always absolute
Previously, if you ran with a relative path, then everything would run fine except that the test name would be blank in the output, eg: 1/1234: instead of: 1/1234: Text/input/canvas/export.html
This commit is contained in:
parent
c4b62ab04d
commit
260074af87
Notes:
github-actions[bot]
2024-10-02 15:37:20 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/260074af871 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1585 Reviewed-by: https://github.com/tcl3
1 changed files with 2 additions and 0 deletions
|
@ -666,6 +666,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
if (!app->test_dry_run)
|
||||
view = TRY(HeadlessWebContentView::create(move(theme), window_size, app->resources_folder));
|
||||
|
||||
auto absolute_test_root_path = LexicalPath::absolute_path(TRY(FileSystem::current_working_directory()), app->test_root_path);
|
||||
app->test_root_path = absolute_test_root_path;
|
||||
auto test_glob = ByteString::formatted("*{}*", app->test_glob);
|
||||
return run_tests(view, app->test_root_path, test_glob, app->dump_failed_ref_tests, app->dump_gc_graph, app->test_dry_run);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue