Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI exclude ObjectStore tests on normal runs #348

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 12 additions & 4 deletions autotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
23 changes: 16 additions & 7 deletions tests/phpunit-autotest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@
timeoutForMediumTests="900"
timeoutForLargeTests="900"
>
<testsuite name='ownCloud'>
<directory suffix='.php'>lib/</directory>
<directory suffix='.php'>settings/</directory>
<directory suffix='.php'>core/</directory>
<directory suffix='.php'>ocs-provider/</directory>
<file>apps.php</file>
</testsuite>
<testsuites>
<testsuite name='main'>
<directory suffix='.php'>lib/</directory>
<directory suffix='.php'>settings/</directory>
<directory suffix='.php'>core/</directory>
<directory suffix='.php'>ocs-provider/</directory>
<file>apps.php</file>
<exclude>
<directory suffix=".php">lib/Files/ObjectStore/</directory>
</exclude>
</testsuite>
<testsuite name='ObjectStore'>
<directory suffix="Test.php">lib/Files/ObjectStore/</directory>
</testsuite>
</testsuites>

<!-- filters for code coverage -->
<filter>
<!-- whitelist processUncoveredFilesFromWhitelist="true" -->
Expand Down