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



commit 18037d38cf04b48b25f12531d4d3808859893a87
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 f9b0924..4e7b4bf 100644
--- a/tests/functional-tests/Makefile.am
+++ b/tests/functional-tests/Makefile.am
@@ -82,28 +82,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]