tests: Move prog_args_save() later

This allows us to append to the arguments later on.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2023-04-11 17:16:11 +01:00 committed by Pekka Paalanen
parent 03add7dce5
commit 3ae62c208c

View file

@ -366,10 +366,6 @@ execute_compositor(const struct compositor_setup *setup,
if (setup->xwayland)
prog_args_take(&args, strdup("--xwayland"));
test_data.test_quirks = setup->test_quirks;
test_data.test_private_data = data;
prog_args_save(&args);
if (setenv("WESTON_MODULE_MAP", WESTON_MODULE_MAP, 0) < 0 ||
setenv("WESTON_DATA_DIR", WESTON_DATA_DIR, 0) < 0) {
fprintf(stderr, "Error: environment setup failed.\n");
@ -411,6 +407,10 @@ execute_compositor(const struct compositor_setup *setup,
}
#endif
test_data.test_quirks = setup->test_quirks;
test_data.test_private_data = data;
prog_args_save(&args);
if (ret == RESULT_OK)
ret = wet_main(args.argc, args.argv, &test_data);