diff options
author | Imre Deak <imre.deak@intel.com> | 2013-08-03 02:10:11 +0300 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2013-08-19 16:38:22 +0300 |
commit | 5cabaae4dd8f3b4f78468b669d9177d593b4472d (patch) | |
tree | 409d55c031ba50e63836abdc40f84facbceb02f8 /lib/drmtest.h | |
parent | e55b89f1c375df20415e0ebe164001b168fb2bde (diff) |
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>
Diffstat (limited to 'lib/drmtest.h')
-rw-r--r-- | lib/drmtest.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/drmtest.h b/lib/drmtest.h index 8419cac8..485d30ef 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -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 |