Browse Source

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
remotes/origin/fix-delete-homeidr-on-userdelete
Thomas Müller 10 years ago
parent
commit
678fe1b8f4
  1. 21
      autotest.sh

21
autotest.sh

@ -260,14 +260,27 @@ function execute_tests {
if [[ "$_XDEBUG_CONFIG" ]]; then if [[ "$_XDEBUG_CONFIG" ]]; then
export XDEBUG_CONFIG=$_XDEBUG_CONFIG export XDEBUG_CONFIG=$_XDEBUG_CONFIG
fi 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 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 else
echo "No coverage" echo "No coverage"
"${PHPUNIT[@]}" --configuration phpunit-autotest.xml --log-junit "autotest-results-$DB.xml" "$2" "$3"
RESULT=$?
fi 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 if [ "$PRIMARY_STORAGE_CONFIG" == "swift" ] ; then
cd .. cd ..

Loading…
Cancel
Save