From 3587a68ed2c3f25f9e423dbb5908e0201415f6d6 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 8 Jul 2016 16:12:48 +0200 Subject: [PATCH 1/2] Separate the objectstore tests in a separate suite * Also allow the testsuite selection in autotest.sh --- autotest.sh | 16 ++++++++++++---- tests/phpunit-autotest.xml | 23 ++++++++++++++++------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/autotest.sh b/autotest.sh index 5f5633fcf0f4f..e0620a1be88d9 100755 --- a/autotest.sh +++ b/autotest.sh @@ -310,15 +310,23 @@ function execute_tests { echo "No coverage" fi + SUITE='' + if [ -n "$TESTSUITE" ]; then + echo "Running testsuite: ${TESTSUITE}" + SUITE="--testsuite $TESTSUITE" + else + echo "Running all testsuites" + fi + 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" + echo "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER $SUITE --log-junit "autotest-results-$DB.xml" "$2" / "$f" "$3" + "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER $SUITE --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" + echo "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER $SUITE --log-junit "autotest-results-$DB.xml" "$2" "$3" + "${PHPUNIT[@]}" --configuration phpunit-autotest.xml $GROUP $COVER $SUITE --log-junit "autotest-results-$DB.xml" "$2" "$3" RESULT=$? fi diff --git a/tests/phpunit-autotest.xml b/tests/phpunit-autotest.xml index 07de887c8cbf9..71bf3756c3a79 100644 --- a/tests/phpunit-autotest.xml +++ b/tests/phpunit-autotest.xml @@ -6,13 +6,22 @@ timeoutForMediumTests="900" timeoutForLargeTests="900" > - - lib/ - settings/ - core/ - ocs-provider/ - apps.php - + + + lib/ + settings/ + core/ + ocs-provider/ + apps.php + + lib/Files/ObjectStore/ + + + + lib/Files/ObjectStore/ + + + From 0b5faa1f9464034a30fddca04acacb0bc672d97b Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 8 Jul 2016 16:16:05 +0200 Subject: [PATCH 2/2] Only run the main test suite --- .drone.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 07ad955acfabb..6934f62187389 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,35 +9,35 @@ build: - rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues - git submodule update --init - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database sqlite --database-pass='' - - NOCOVERAGE=true ./autotest.sh sqlite + - TESTSUITE=main NOCOVERAGE=true ./autotest.sh sqlite sqlite-php5.5: image: nextcloudci/php5.5:1.0.7 commands: - rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues - git submodule update --init - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database sqlite --database-pass='' - - NOCOVERAGE=true ./autotest.sh sqlite + - TESTSUITE=main NOCOVERAGE=true ./autotest.sh sqlite sqlite: image: nextcloudci/php5.6:1.0.6 commands: - rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues - git submodule update --init - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database sqlite --database-pass='' - - ./autotest.sh sqlite + - TESTSUITE=main ./autotest.sh sqlite mysql: image: nextcloudci/php5.6:1.0.6 commands: - sleep 15 # gives the database enough time to initialize - rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues - git submodule update --init - - ./autotest.sh mysql + - TESTSUITE=main ./autotest.sh mysql postgres: image: nextcloudci/php5.6:1.0.6 commands: - sleep 10 # gives the database enough time to initialize - rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues - git submodule update --init - - ./autotest.sh pgsql + - TESTSUITE=main ./autotest.sh pgsql integration: image: nextcloudci/php5.6:1.0.6 commands: