mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-23 14:23:03 +00:00
lib: add subtest extra command line option handling
At the moment any command line option handling done by tests will interfere with the option handling of the subtest interface. To fix this add a new version of the subtest_init function accepting optional short and long command line options. Merge these together with the subtest interface's own long options and handle both together in the same getopt_long call. Signed-off-by: Imre Deak <imre.deak@intel.com>
This commit is contained in:
@@ -101,6 +101,13 @@ void igt_progress(const char *header, uint64_t i, uint64_t total);
|
||||
/* subtest infrastructure */
|
||||
jmp_buf igt_subtest_jmpbuf;
|
||||
void igt_subtest_init(int argc, char **argv);
|
||||
typedef int (*igt_opt_handler_t)(int opt, int opt_index);
|
||||
struct option;
|
||||
int igt_subtest_init_parse_opts(int argc, char **argv,
|
||||
const char *extra_short_opts,
|
||||
struct option *extra_long_opts,
|
||||
const char *help_str,
|
||||
igt_opt_handler_t opt_handler);
|
||||
bool __igt_run_subtest(const char *subtest_name);
|
||||
/**
|
||||
* igt_subtest/_f - Denote a subtest code block
|
||||
|
||||
Reference in New Issue
Block a user