[next] telepathy-idle: Pass G_TEST_SRCDIR, G_TEST_BUILDDIR to run-test.sh in its environment

Simon McVittie smcv at kemper.freedesktop.org
Mon Apr 7 09:05:00 PDT 2014


Module: telepathy-idle
Branch: next
Commit: ed8bc2fbb2916f951f711c9bc22aefdac4a5c1ed
URL:    http://cgit.freedesktop.org/telepathy/telepathy-idle/commit/?id=ed8bc2fbb2916f951f711c9bc22aefdac4a5c1ed

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Wed Apr  2 18:54:48 2014 +0100

Pass G_TEST_SRCDIR, G_TEST_BUILDDIR to run-test.sh in its environment

---

 tests/twisted/Makefile.am    |    4 ++--
 tests/twisted/run-test.sh.in |   13 ++++---------
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index 903e4a7..1f79c60 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -54,8 +54,8 @@ check-twisted: $(BUILT_SOURCES)
 		idle_test_sleep=--sleep=$(CHECK_TWISTED_SLEEP); \
 	fi; \
 	CHECK_TWISTED_UNINSTALLED=1 \
-	  IDLE_ABS_TOP_SRCDIR=@abs_top_srcdir@ \
-	  IDLE_ABS_TOP_BUILDDIR=@abs_top_builddir@ \
+	  G_TEST_SRCDIR=@abs_srcdir@ \
+	  G_TEST_BUILDDIR=@abs_builddir@ \
 	  CHECK_TWISTED_SLEEP=$$idle_test_sleep \
 	  ./run-test.sh "$(TWISTED_TESTS)"
 
diff --git a/tests/twisted/run-test.sh.in b/tests/twisted/run-test.sh.in
index 9faa55e..ffc7c0c 100644
--- a/tests/twisted/run-test.sh.in
+++ b/tests/twisted/run-test.sh.in
@@ -15,20 +15,15 @@ if test "x$CHECK_TWISTED_UNINSTALLED" = x; then
   PYTHONPATH="${G_TEST_SRCDIR}"
   export PYTHONPATH
 else
-  if test -z "$IDLE_ABS_TOP_SRCDIR"; then
-    echo "IDLE_ABS_TOP_SRCDIR must be set" >&2
+  if ! test -d "$G_TEST_SRCDIR"; then
+    echo "G_TEST_SRCDIR must be set and absolute" >&2
     exit 1
   fi
-  if test -z "$IDLE_ABS_TOP_BUILDDIR"; then
-    echo "IDLE_ABS_TOP_BUILDDIR must be set" >&2
+  if ! test -d "$G_TEST_BUILDDIR"; then
+    echo "G_TEST_BUILDDIR must be set and absolute" >&2
     exit 1
   fi
 
-  G_TEST_SRCDIR="${IDLE_ABS_TOP_SRCDIR}/tests/twisted"
-  export G_TEST_SRCDIR
-  G_TEST_BUILDDIR="${IDLE_ABS_TOP_BUILDDIR}/tests/twisted"
-  export G_TEST_BUILDDIR
-
   PYTHONPATH="${G_TEST_SRCDIR}:${G_TEST_BUILDDIR}"
   export PYTHONPATH
 fi



More information about the telepathy-commits mailing list