[gnome-builder] tests: Use srcdir instead of builddir to find test data



commit fb3302c95654cd6d1294038ee33c2595565fdc14
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Tue Nov 15 16:29:47 2016 +0800

    tests: Use srcdir instead of builddir to find test data
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774456

 tests/test-ide-buffer-manager.c |    4 ++--
 tests/test-ide-context.c        |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tests/test-ide-buffer-manager.c b/tests/test-ide-buffer-manager.c
index 72f07cc..6681bf2 100644
--- a/tests/test-ide-buffer-manager.c
+++ b/tests/test-ide-buffer-manager.c
@@ -155,12 +155,12 @@ test_buffer_manager_basic (GCancellable        *cancellable,
 {
   g_autoptr(GFile) project_file = NULL;
   g_autofree gchar *path = NULL;
-  const gchar *builddir = g_getenv ("G_TEST_BUILDDIR");
+  const gchar *srcdir = g_getenv ("G_TEST_SRCDIR");
   g_autoptr(GTask) task = NULL;
 
   task = g_task_new (NULL, cancellable, callback, user_data);
 
-  path = g_build_filename (builddir, "data", "project1", "configure.ac", NULL);
+  path = g_build_filename (srcdir, "data", "project1", "configure.ac", NULL);
   project_file = g_file_new_for_path (path);
 
   ide_context_new_async (project_file,
diff --git a/tests/test-ide-context.c b/tests/test-ide-context.c
index 3415818..4755298 100644
--- a/tests/test-ide-context.c
+++ b/tests/test-ide-context.c
@@ -55,13 +55,13 @@ test_new_async (GCancellable        *cancellable,
 {
   g_autofree gchar *path = NULL;
   g_autoptr(GFile) project_file = NULL;
-  const gchar *builddir;
+  const gchar *srcdir;
   GTask *task;
 
-  builddir = g_getenv ("G_TEST_BUILDDIR");
+  srcdir = g_getenv ("G_TEST_SRCDIR");
 
   task = g_task_new (NULL, cancellable, callback, user_data);
-  path = g_build_filename (builddir, "data", "project1", "configure.ac", NULL);
+  path = g_build_filename (srcdir, "data", "project1", "configure.ac", NULL);
   project_file = g_file_new_for_path (path);
 
   ide_context_new_async (project_file,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]