[tracker] functional-tests: Separate out test-runner.sh from Makefile



commit bcc657584140c05e0bc3a11cceb183f4893bab09
Author: Sam Thursfield <samthursfield codethink co uk>
Date:   Thu Aug 4 17:42:54 2011 +0100

    functional-tests: Separate out test-runner.sh from Makefile

 tests/functional-tests/Makefile.am    |   24 +++++-------------------
 tests/functional-tests/test-runner.sh |   11 +++++++++++
 2 files changed, 16 insertions(+), 19 deletions(-)
---
diff --git a/tests/functional-tests/Makefile.am b/tests/functional-tests/Makefile.am
index 157f52c..ced5b8e 100644
--- a/tests/functional-tests/Makefile.am
+++ b/tests/functional-tests/Makefile.am
@@ -84,28 +84,14 @@ ttl/gen-test-data.stamp:
 	cd ttl && $(MAKE) $(AM_MAKEFLAGS)
 
 functional-test: ${standard_tests}
-	@if test -h /targets/links/scratchbox.config ; then \
-		export SBOX_REDIRECT_IGNORE=/usr/bin/python ; \
-		ENV_COMMAND_WRAPPER=meego-run ;	\
-	else \
-		ENV_COMMAND_WRAPPER="" ; \
-	fi ; \
-	for testfile in ${standard_tests} ; do \
-	  echo "Trying with" $$ENV_COMMAND_WRAPPER $$testfile ; \
-	  test ! -x $$testfile  || $$ENV_COMMAND_WRAPPER ./$$testfile > /dev/null; \
-	 done
+	for test in ${standard_tests} ; do \
+		./test-runner.sh python ./$$test; \
+	done
 
 functional-test-slow: ${slow_tests}
-	@if test -h /targets/links/scratchbox.config ; then \
-		export SBOX_REDIRECT_IGNORE=/usr/bin/python ; \
-		ENV_COMMAND_WRAPPER=meego-run ; \
-	else \
-		ENV_COMMAND_WRAPPER="" ; \
-	fi ; \
 	@for test in ${slow_tests} ; do \
-	  echo "Trying with" $$ENV_COMMAND_WRAPPER $$test ; \
-	  test ! -x $$test  || $$ENV_COMMAND_WRAPPER ./$$test > /dev/null; \
-	 done
+		./test-runner.sh python ./$$test; \
+	done
 
 EXTRA_DIST = \
 	$(config_SCRIPTS) \
diff --git a/tests/functional-tests/test-runner.sh b/tests/functional-tests/test-runner.sh
new file mode 100755
index 0000000..2a3a018
--- /dev/null
+++ b/tests/functional-tests/test-runner.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Test runner script for Tracker's functional tests
+
+if test -h /targets/links/scratchbox.config ; then
+    export SBOX_REDIRECT_IGNORE=/usr/bin/python ;
+
+    meego-run $@
+else
+    $@
+fi ;



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