diff options
| author | Petri Latvala <petri.latvala@intel.com> | 2018-04-19 13:20:11 +0300 | 
|---|---|---|
| committer | Petri Latvala <petri.latvala@intel.com> | 2018-04-19 13:22:30 +0300 | 
| commit | 07af56fa407abd53498f7745bd39858482ba490a (patch) | |
| tree | ac73db0f8182cdae2e007b276d3e68d209755a01 | |
| parent | 8168bb65d5e64d4df4e5d847d448bab2d2825d73 (diff) | |
lib: Print subtest starting line to stderr too
... when instructed via the environment. This is needed for the new
test runner.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
| -rw-r--r-- | lib/igt_core.c | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c index 5092a3f0..9e953492 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -305,6 +305,8 @@ GKeyFile *igt_key_file;  char *igt_frame_dump_path; +static bool stderr_needs_sentinel = false; +  const char *igt_test_name(void)  {  	return command_str; @@ -649,6 +651,8 @@ static void common_init_env(void)  	}  	igt_frame_dump_path = getenv("IGT_FRAME_DUMP_PATH"); + +	stderr_needs_sentinel = getenv("IGT_SENTINEL_ON_STDERR") != NULL;  }  static int common_init(int *argc, char **argv, @@ -932,7 +936,9 @@ bool __igt_run_subtest(const char *subtest_name)  	igt_kmsg(KMSG_INFO "%s: starting subtest %s\n",  		 command_str, subtest_name); -	igt_debug("Starting subtest: %s\n", subtest_name); +	igt_info("Starting subtest: %s\n", subtest_name); +	if (stderr_needs_sentinel) +		fprintf(stderr, "Starting subtest: %s\n", subtest_name);  	_igt_log_buffer_reset();  | 
