summaryrefslogtreecommitdiff
path: root/lib/igt_core.c
diff options
context:
space:
mode:
authorLyude <lyude@redhat.com>2017-07-19 13:46:01 -0400
committerLyude <lyude@redhat.com>2017-07-19 13:46:01 -0400
commitde99e15db60864cdb177f8fb380e79bb510ff9ea (patch)
treea1437b0671b753ead1dea972ae7dbb603a801fcd /lib/igt_core.c
parent4c70d6e66faa177ceb072fa346b4cbe3b19330c1 (diff)
igt_core: Add the rest of Paul's patch I forgot by accident
Whoops, I meant to commit the entirity of Paul's patch but it appears I forgot to stage all of the changes to igt_core. This should have been included in the previous commit. Signed-off-by: Lyude <lyude@redhat.com>
Diffstat (limited to 'lib/igt_core.c')
-rw-r--r--lib/igt_core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 5a3b00e8..028ef6bd 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -293,7 +293,10 @@ static struct {
} log_buffer;
static pthread_mutex_t log_buffer_mutex = PTHREAD_MUTEX_INITIALIZER;
+#ifdef HAVE_GLIB
GKeyFile *igt_key_file;
+#endif
+
char *frame_dump_path;
const char *igt_test_name(void)
@@ -618,6 +621,7 @@ static void oom_adjust_for_doom(void)
}
+#ifdef HAVE_GLIB
static int config_parse(void)
{
GError *error = NULL;
@@ -643,6 +647,7 @@ static int config_parse(void)
return 0;
}
+#endif
static int common_init(int *argc, char **argv,
const char *extra_short_opts,
@@ -799,6 +804,7 @@ static int common_init(int *argc, char **argv,
snprintf(key_file_loc, 100, "%s/.igtrc", g_get_home_dir());
}
+#ifdef HAVE_GLIB
igt_key_file = g_key_file_new();
ret = g_key_file_load_from_file(igt_key_file, key_file_loc,
G_KEY_FILE_NONE, &error);
@@ -811,6 +817,7 @@ static int common_init(int *argc, char **argv,
}
ret = config_parse();
+#endif
out:
if (!key_file_env && key_file_loc)
@@ -1423,8 +1430,10 @@ void igt_exit(void)
{
igt_exit_called = true;
+#ifdef HAVE_GLIB
if (igt_key_file)
g_key_file_free(igt_key_file);
+#endif
if (run_single_subtest && !run_single_subtest_found) {
igt_warn("Unknown subtest: %s\n", run_single_subtest);