summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-03-02 00:51:38 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2015-03-02 00:51:38 -0800
commit58ec0ea734694cbe8009498a276ef5137aec721d (patch)
tree998252e58625d69be5ab14764cabd0d19b3335b9
parent4009f152558fd5a18cddb37be776fe38e79879c9 (diff)
parent62d54e4c2a4140d77450c538b66cbf35a1045332 (diff)
downloadnextcloud-server-58ec0ea734694cbe8009498a276ef5137aec721d.tar.gz
nextcloud-server-58ec0ea734694cbe8009498a276ef5137aec721d.zip
Merge pull request #14535 from owncloud/fix-files-external
fix files external test run and add common-tests option
-rw-r--r--apps/files_external/tests/README.md5
-rwxr-xr-xautotest-external.sh9
2 files changed, 12 insertions, 2 deletions
diff --git a/apps/files_external/tests/README.md b/apps/files_external/tests/README.md
index 35a0232434e..0b3c7fd004f 100644
--- a/apps/files_external/tests/README.md
+++ b/apps/files_external/tests/README.md
@@ -42,6 +42,11 @@ then runs the unit test suite from `backends/webdav.php` (because the middle par
the name of the script is `webdav`) and finally tries to call
`stop-webdav-ownCloud.sh` for cleanup purposes.
+If `common-tests` is supplied as second argument it will skip the backend specific
+part completely and just run the common files_external unit tests:
+
+ ./autotest-external.sh sqlite common-tests
+
## The more manual way of unit test execution
If you want to debug your external storage provider, you maybe don't want to
diff --git a/autotest-external.sh b/autotest-external.sh
index 74acddfd7a0..8254defc9ca 100755
--- a/autotest-external.sh
+++ b/autotest-external.sh
@@ -24,6 +24,7 @@ function print_syntax {
echo -e "\nExample: ./autotest.sh sqlite webdav-ownCloud" >&2
echo "will run the external suite from \"apps/files_external/tests/env/start-webdav-ownCloud.sh\"" >&2
echo -e "\nIf no arguments are specified, all available external backends will be run with all database configs" >&2
+ echo -e "\nIf you specify 'common-tests' as startfile it will just run the tests that are independent from the backends" >&2
}
if ! [ -x "$PHPUNIT" ]; then
@@ -219,14 +220,18 @@ EOF
# just enable files_external
php ../occ app:enable files_external
if [ -z "$NOCOVERAGE" ]; then
- #"$PHPUNIT" --configuration phpunit-autotest-external.xml --log-junit "autotest-external-results-$1.xml" --coverage-clover "autotest-external-clover-$1.xml" --coverage-html "coverage-external-html-$1"
+ "$PHPUNIT" --configuration phpunit-autotest-external.xml --log-junit "autotest-external-results-$1.xml" --coverage-clover "autotest-external-clover-$1.xml" --coverage-html "coverage-external-html-$1"
RESULT=$?
else
echo "No coverage"
- #"$PHPUNIT" --configuration phpunit-autotest-external.xml --log-junit "autotest-external-results-$1.xml"
+ "$PHPUNIT" --configuration phpunit-autotest-external.xml --log-junit "autotest-external-results-$1.xml"
RESULT=$?
fi
+ if [ -n "$2" -a "$2" == "common-tests" ]; then
+ return;
+ fi
+
FILES_EXTERNAL_BACKEND_PATH=../apps/files_external/tests/backends
FILES_EXTERNAL_BACKEND_ENV_PATH=../apps/files_external/tests/env