diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-07-14 14:42:23 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-07-14 15:03:59 +0200 |
commit | 5a98fe9d4ae7431a9c65579dcc0ac32ff3e83adf (patch) | |
tree | 0ead4fe77394c86e0b858922139d903336c17084 /lib | |
parent | c7be53c7cb9aa7159ea316b56be119efd436ec17 (diff) |
lib: Add argc/argv to igt_simple_init
There's a pile of ideas around to add generally useful options like
--debug to all igt tests. Or unify the runtime behaviour between
simple and subtest tests a bit more.
The first step to get there is to add argc/argv to igt_simple_init so
that we can get at the argument list.
Cc: Tim Gore <tim.gore@intel.com>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_core.c | 4 | ||||
-rw-r--r-- | lib/igt_core.h | 9 |
2 files changed, 5 insertions, 8 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c index b7bd1692..1015b91d 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -451,6 +451,8 @@ void igt_subtest_init(int argc, char **argv) /** * igt_simple_init: + * @argc: argc from the test's main() + * @argv: argv from the test's main() * * This initializes a simple test without any support for subtests. * @@ -458,7 +460,7 @@ void igt_subtest_init(int argc, char **argv) * #igt_simple_main block instead of stitching the tests's main() function together * manually. */ -void igt_simple_init(void) +void igt_simple_init(int argc, char **argv) { print_version(); diff --git a/lib/igt_core.h b/lib/igt_core.h index e252eba7..8438d006 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -161,12 +161,7 @@ bool igt_only_list_subtests(void); } \ static void igt_tokencat(__real_main, __LINE__)(void) \ -/** - * igt_simple_init: - * - * Init for simple tests without subtests - */ -void igt_simple_init(void); +void igt_simple_init(int argc, char **argv); /** * igt_simple_main: @@ -178,7 +173,7 @@ void igt_simple_init(void); #define igt_simple_main \ static void igt_tokencat(__real_main, __LINE__)(void); \ int main(int argc, char **argv) { \ - igt_simple_init(); \ + igt_simple_init(argc, argv); \ igt_tokencat(__real_main, __LINE__)(); \ exit(0); \ } \ |