Skip to content

Commit

Permalink
Separate the objectstore tests in a separate suite
Browse files Browse the repository at this point in the history
* Also allow the testsuite selection in autotest.sh
  • Loading branch information
rullzer committed Jul 8, 2016
1 parent 48f9e4e commit 3587a68
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
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

0 comments on commit 3587a68

Please sign in to comment.