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_aux.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_aux.c')
-rw-r--r-- | lib/igt_aux.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c index 76681062..49ef4625 100644 --- a/lib/igt_aux.c +++ b/lib/igt_aux.c @@ -450,32 +450,32 @@ void igt_drop_root(void) /** * igt_debug_wait_for_keypress: - * @key: env var lookup to to enable this wait + * @var: var lookup to to enable this wait * * Waits for a key press when run interactively and when the corresponding debug - * key is set in the IGT_DEBUG_INTERACTIVE environment variable. Multiple keys + * var is set in the --interactive-debug=<var> variable. Multiple keys * can be specified as a comma-separated list or alternatively "all" if a wait - * should happen for all keys. When not connected to a terminal the environment - * setting is ignored and execution immediately continues. + * should happen for all cases. + * + * When not connected to a terminal interactive_debug is ignored + * and execution immediately continues. * * This is useful for display tests where under certain situation manual * inspection of the display is useful. Or when running a testcase in the * background. */ -void igt_debug_wait_for_keypress(const char *key) +void igt_debug_wait_for_keypress(const char *var) { struct termios oldt, newt; - const char *env; if (!isatty(STDIN_FILENO)) return; - env = getenv("IGT_DEBUG_INTERACTIVE"); - - if (!env) + if (!igt_interactive_debug) return; - if (!strstr(env, key) && !strstr(env, "all")) + if (!strstr(igt_interactive_debug, var) && + !strstr(igt_interactive_debug, "all")) return; igt_info("Press any key to continue ...\n"); |