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:
authorThomas Müller <thomas.mueller@tmit.eu>2015-11-03 02:24:23 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-11-30 12:55:05 +0300
commit678fe1b8f4c2e0557955e4552621074574970a62 (patch)
tree062c3b500571ea33cd4766e4fb2d91578a1db1f2 /autotest.sh
parent03ee3b9aec75a1e53e44333744cbbea331c65067 (diff)
Introduce evaluation of an environment variable to choose if all, only database or only database unit tests are to be executed.
This is mainly required on automated execution on Jenkins
Diffstat (limited to 'autotest.sh')
-rwxr-xr-xautotest.sh21
1 files changed, 17 insertions, 4 deletions
diff --git a/autotest.sh b/autotest.sh
index f0efc45ccca..ae8e9f0d484 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -260,14 +260,27 @@ function execute_tests {
if [[ "$_XDEBUG_CONFIG" ]]; then
export XDEBUG_CONFIG=$_XDEBUG_CONFIG
fi
+ if [ -z "$TEST_SELECTION" ]; then
+ TEST_SELECTION='all'
+ fi
+ GROUP=''
+ if [ "$TEST_SELECTION" == "DB" ]; then
+ GROUP='--group DB'
+ fi
+ if [ "$TEST_SELECTION" == "NODB" ]; then
+ GROUP='--exclude-group DB'
+ fi
+
+ COVER=''
if [ -z "$NOCOVERAGE" ]; then
- "${PHPUNIT[@]}" --configuration phpunit-autotest.xml --log-junit "autotest-results-$DB.xml" --coverage-clover "autotest-clover-$DB.xml" --coverage-html "coverage-html-$DB" "$2" "$3"
- RESULT=$?
+ COVER='--coverage-clover "autotest-clover-$DB.xml" --coverage-html "coverage-html-$DB"'
+ "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP --log-junit "autotest-results-$DB.xml" --coverage-clover "autotest-clover-$DB.xml" --coverage-html "coverage-html-$DB" "$2" "$3"
else
echo "No coverage"
- "${PHPUNIT[@]}" --configuration phpunit-autotest.xml --log-junit "autotest-results-$DB.xml" "$2" "$3"
- RESULT=$?
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"
+ RESULT=$?
if [ "$PRIMARY_STORAGE_CONFIG" == "swift" ] ; then
cd ..