mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-11 16:32:58 +00:00
lib: remove handled option arguments from argv
Remove options from argv that have been handled by getopt to allow additional non-option parameters to be processed in the test application. This fixes issues when using options such as --debug with tests that accept additional non-option parameters. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
@@ -144,7 +144,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
|
||||
igt_simple_init_parse_opts(argc, argv, "i:c:n:mu", NULL, NULL,
|
||||
igt_simple_init_parse_opts(&argc, argv, "i:c:n:mu", NULL, NULL,
|
||||
opt_handler);
|
||||
|
||||
fd = drm_open_any_render();
|
||||
|
||||
@@ -141,7 +141,7 @@ int main(int argc, char **argv)
|
||||
igt_render_copyfunc_t render_copy = NULL;
|
||||
int opt_dump_aub = igt_aub_dump_enabled();
|
||||
|
||||
igt_simple_init_parse_opts(argc, argv, "da", NULL, NULL, opt_handler);
|
||||
igt_simple_init_parse_opts(&argc, argv, "da", NULL, NULL, opt_handler);
|
||||
|
||||
igt_fixture {
|
||||
data.drm_fd = drm_open_any_render();
|
||||
|
||||
@@ -503,7 +503,7 @@ int main(int argc, char **argv)
|
||||
options.prewrap_space = 21;
|
||||
options.buffers = 10;
|
||||
|
||||
igt_simple_init_parse_opts(argc, argv, "n:bvt:dp:ri:", long_options,
|
||||
igt_simple_init_parse_opts(&argc, argv, "n:bvt:dp:ri:", long_options,
|
||||
help, parse_options);
|
||||
|
||||
card_index = drm_get_card();
|
||||
|
||||
+1
-1
@@ -854,7 +854,7 @@ int main(int argc, char **argv)
|
||||
options.tiles_per_buf = options.scratch_buf_size / TILE_BYTES(options.tile_size);
|
||||
options.check_render_cpyfn = 0;
|
||||
|
||||
igt_simple_init_parse_opts(argc, argv,"ds:g:c:t:rbuxmo:fp:",
|
||||
igt_simple_init_parse_opts(&argc, argv,"ds:g:c:t:rbuxmo:fp:",
|
||||
long_options, NULL, parse_options);
|
||||
|
||||
drm_fd = drm_open_any();
|
||||
|
||||
@@ -489,7 +489,7 @@ int main(int argc, char *argv[])
|
||||
data_t data = {};
|
||||
enum operations op;
|
||||
|
||||
igt_subtest_init_parse_opts(argc, argv, "", long_options,
|
||||
igt_subtest_init_parse_opts(&argc, argv, "", long_options,
|
||||
help_str, opt_handler);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
|
||||
+1
-1
@@ -699,7 +699,7 @@ int main(int argc, char **argv)
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
ret = igt_subtest_init_parse_opts(argc, argv, "dt:", NULL, help_str,
|
||||
ret = igt_subtest_init_parse_opts(&argc, argv, "dt:", NULL, help_str,
|
||||
opt_handler);
|
||||
if (ret < 0)
|
||||
return ret == -1 ? 0 : ret;
|
||||
|
||||
+1
-1
@@ -1811,7 +1811,7 @@ int main(int argc, char *argv[])
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
igt_subtest_init_parse_opts(argc, argv, "", long_options,
|
||||
igt_subtest_init_parse_opts(&argc, argv, "", long_options,
|
||||
help_str, opt_handler);
|
||||
|
||||
/* Skip instead of failing in case the machine is not prepared to reach
|
||||
|
||||
Reference in New Issue
Block a user