Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'autotest.sh')
-rwxr-xr-xautotest.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/autotest.sh b/autotest.sh
index 40c54102eae..f237f8aa11a 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -253,7 +253,9 @@ function execute_tests {
echo "Postgres is up."
else
- dropdb -U "$DATABASEUSER" "$DATABASENAME" || true
+ if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI
+ dropdb -U "$DATABASEUSER" "$DATABASENAME" || true
+ fi
fi
fi
if [ "$DB" == "oci" ] ; then
@@ -303,9 +305,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 ..