summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2016-06-14 14:14:11 +0200
committerGitHub <noreply@github.com>2016-06-14 14:14:11 +0200
commit6b0577c69916843cd59f3187a30b6dc6c4480aa5 (patch)
tree0a3dae81bfe4a2e68a2c7da3fd606d7fa5249e3f
parent7d7eab6199e68a99d628eff05d9bc1fff1e0d3dd (diff)
parente7cb21b7e92fdd5ae6f10eca889dcb9990661973 (diff)
downloadnextcloud-server-6b0577c69916843cd59f3187a30b6dc6c4480aa5.tar.gz
nextcloud-server-6b0577c69916843cd59f3187a30b6dc6c4480aa5.zip
Merge pull request #90 from nextcloud/improved-autotest
allow to execute multiple tests in a directory at once
-rwxr-xr-xautotest.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/autotest.sh b/autotest.sh
index e798157fe64..57d65e692d4 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -303,9 +303,18 @@ function execute_tests {
else
echo "No coverage"
fi
- echo "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
- "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
+
+ if [ -d "$2" ]; then
+ for f in $(find "$2" -name '*.php'); do
+ echo "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" / "$f" "$3"
+ "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$f" "$3"
+ RESULT=$?
+ done;
+ else
+ echo "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
+ "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER --log-junit "autotest-results-$DB.xml" "$2" "$3"
RESULT=$?
+ fi
if [ "$PRIMARY_STORAGE_CONFIG" == "swift" ] ; then
cd ..