diff options
author | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2015-01-12 10:21:58 -0800 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-20 11:36:10 +0100 |
commit | 3d65ff780d6d7a1b354bd530942a194a97f73dca (patch) | |
tree | 4b747685090c905933574634c8b93c7ed6dc0c22 /lib/igt_core.c | |
parent | eeff390598f6bf7292a9775cc6c470207f90a128 (diff) |
lib: s/IGT_DEBUG_INTERACTIVE/--interactive-debug=var
Use cmdline variable for interactive debug instead of env var.
v2: Make interactive-debug domain optional and use "all" when not set.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/igt_core.c')
-rw-r--r-- | lib/igt_core.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c index 87a13a76..7b47b32b 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -233,6 +233,7 @@ enum { OPT_RUN_SUBTEST, OPT_DESCRIPTION, OPT_DEBUG, + OPT_INTERACTIVE_DEBUG, OPT_HELP = 'h' }; @@ -403,6 +404,7 @@ static void print_usage(const char *help_str, bool output_on_stderr) fprintf(f, " --list-subtests\n" " --run-subtest <pattern>\n" " --debug[=log-domain]\n" + " --interactive-debug[=domain]\n" " --help-description\n" " --help\n"); if (help_str) @@ -435,6 +437,7 @@ static int common_init(int argc, char **argv, {"run-subtest", 1, 0, OPT_RUN_SUBTEST}, {"help-description", 0, 0, OPT_DESCRIPTION}, {"debug", optional_argument, 0, OPT_DEBUG}, + {"interactive-debug", optional_argument, 0, OPT_INTERACTIVE_DEBUG}, {"help", 0, 0, OPT_HELP}, {0, 0, 0, 0} }; @@ -520,6 +523,12 @@ static int common_init(int argc, char **argv, while ((c = getopt_long(argc, argv, short_opts, combined_opts, &option_index)) != -1) { switch(c) { + case OPT_INTERACTIVE_DEBUG: + if (optarg && strlen(optarg) > 0) + igt_interactive_debug = strdup(optarg); + else + igt_interactive_debug = "all"; + break; case OPT_DEBUG: igt_log_level = IGT_LOG_DEBUG; if (optarg && strlen(optarg) > 0) |