diff --git a/.travis.yml b/.travis.yml
index 74dbfe00f01254c6d556b912f28c30bd35f00309..95e8a2f7de4b507b7ad50eb4da06228a7a2b3fd5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,7 +5,7 @@ php:
 
 env:
   global:
-    - APP=dav
+    - TEST_DAV=$(tests/travis/changed_app.sh dav)
     - TC=litmus-v2
   matrix:
     - DB=sqlite
@@ -21,20 +21,22 @@ addons:
     - realpath
 
 before_install:
-  - bash tests/travis/test_for_app.sh $APP
-  - bash tests/travis/before_install.sh $DB
+  - sh -c "if [ '$TEST_DAV' = '1' ]; then bash tests/travis/before_install.sh $DB; fi"
 
 install:
-  - bash tests/travis/install.sh $DB
+  - sh -c "if [ '$TEST_DAV' = '1' ]; then bash tests/travis/install.sh $DB; fi"
 
 script:
-  - bash apps/$APP/tests/travis/$TC.sh
+  - sh -c "if [ '$TEST_DAV' != '1' ]; then echo \"Not testing DAV\"; fi"
+  - sh -c "if [ '$TEST_DAV' = '1' ]; then echo \"Testing DAV\"; fi"
+
+  - sh -c "if [ '$TEST_DAV' = '1' ]; then bash apps/dav/tests/travis/$TC.sh; fi"
 
 matrix:
   include:
     - php: 5.4
-      env: DB=pgsql;TC=litmus-v1;APP=dav
+      env: DB=pgsql;TC=litmus-v1
 #    - php: 5.4
-#      env: DB=mysql;TC=caldavtester;APP=dav
+#      env: DB=mysql;TC=caldavtester
 
   fast_finish: true
diff --git a/tests/travis/changed_app.sh b/tests/travis/changed_app.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a4be0476573688d61f1677640b9f12534c2f8af8
--- /dev/null
+++ b/tests/travis/changed_app.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# ownCloud
+#
+# @author Joas Schilling
+# @author Thomas Müller
+# @copyright 2015 Thomas Müller thomas.mueller@tmit.eu
+#
+
+APP=$1
+
+FOUND=$(git diff ${TRAVIS_COMMIT_RANGE} | grep -- "^+++ b/apps/$APP/")
+
+if [ "x$FOUND" != 'x' ]; then
+	echo "1"
+else
+	echo "0"
+fi
diff --git a/tests/travis/test_for_app.sh b/tests/travis/test_for_app.sh
deleted file mode 100755
index a97c66dba83b94bb2b11a2c2e5681dbdd18a5d68..0000000000000000000000000000000000000000
--- a/tests/travis/test_for_app.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-#
-# ownCloud
-#
-# @author Thomas Müller
-# @copyright 2015 Thomas Müller thomas.mueller@tmit.eu
-#
-
-set -e
-APP=$1
-
-if git diff ${TRAVIS_COMMIT_RANGE} | grep -- "^+++ b/apps/$APP/"; then
-	echo "Executing this test config ...."
-else
-	echo "Test config is not relevant for this change. terminating"
-	exit 1
-fi