[gimp] app/tests: Explain why gimp_test_utils_get_source_subdir() might fail



commit 0e9f4342778551f52314c7d0c550da61487ec018
Author: Martin Nordholts <martinn src gnome org>
Date:   Sat Jan 16 23:51:23 2010 +0100

    app/tests: Explain why gimp_test_utils_get_source_subdir() might fail

 app/tests/gimp-app-test-utils.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/app/tests/gimp-app-test-utils.c b/app/tests/gimp-app-test-utils.c
index baae49b..7b06129 100644
--- a/app/tests/gimp-app-test-utils.c
+++ b/app/tests/gimp-app-test-utils.c
@@ -70,6 +70,12 @@ gimp_test_utils_setup_menus_dir (void)
 gchar *
 gimp_test_utils_get_source_subdir (const gchar *subdir)
 {
+  const gchar *abs_top_srcdir = g_getenv ("GIMP_TESTING_ABS_TOP_SRCDIR");
+
+  if (! abs_top_srcdir)
+    g_printerr ("The env var GIMP_TESTING_ABS_TOP_SRCDIR is not set, you are probably\n"
+                "running in a debugger. Set it manually to e.g. ~/source/gimp");
+
   /* GIMP_TESTING_ABS_TOP_SRCDIR is set by the automake test runner,
    * see Makefile.am
    */



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