Add group for cache tests
This commit is contained in:
parent
d5dd12b8f8
commit
0823f4d72d
22
autotest.sh
22
autotest.sh
|
@ -134,13 +134,31 @@ function execute_tests {
|
||||||
echo "No coverage"
|
echo "No coverage"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# per default, there is no cache installed
|
||||||
|
GROUP='--exclude-group=REDIS,MEMCACHE,MEMCACHED,APCU'
|
||||||
|
if [ "$TEST_SELECTION" == "REDIS" ]; then
|
||||||
|
GROUP="--group REDIS"
|
||||||
|
fi
|
||||||
|
if [ "$TEST_SELECTION" == "MEMCACHE" ]; then
|
||||||
|
GROUP="--group MEMCACHE"
|
||||||
|
fi
|
||||||
|
if [ "$TEST_SELECTION" == "MEMCACHED" ]; then
|
||||||
|
GROUP="--group MEMCACHED"
|
||||||
|
fi
|
||||||
|
if [ "$TEST_SELECTION" == "APCU" ]; then
|
||||||
|
GROUP="--group APCU"
|
||||||
|
fi
|
||||||
|
if [ "$TEST_SELECTION" == "NODB" ]; then
|
||||||
|
GROUP="--exclude-group=DB,SLOWDB"
|
||||||
|
fi
|
||||||
|
|
||||||
INPUT="$BASEDIR/tests"
|
INPUT="$BASEDIR/tests"
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
INPUT="$INPUT/$1"
|
INPUT="$INPUT/$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "${PHPUNIT[@]}" --configuration tests/phpunit.xml $COVER --log-junit "autotest-results.xml" "$INPUT" "$2"
|
echo "${PHPUNIT[@]}" --configuration tests/phpunit.xml "$GROUP" "$COVER" --log-junit "autotest-results.xml" "$INPUT" "$2"
|
||||||
"${PHPUNIT[@]}" --configuration tests/phpunit.xml $COVER --log-junit "autotest-results.xml" "$INPUT" "$2"
|
"${PHPUNIT[@]}" --configuration tests/phpunit.xml "$GROUP" "$COVER" --log-junit "autotest-results.xml" "$INPUT" "$2"
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
|
|
||||||
if [ -n "$DOCKER_CONTAINER_ID" ]; then
|
if [ -n "$DOCKER_CONTAINER_ID" ]; then
|
||||||
|
|
|
@ -4,6 +4,9 @@ namespace Friendica\Test\src\Core\Cache;
|
||||||
|
|
||||||
use Friendica\Core\Cache\APCuCache;
|
use Friendica\Core\Cache\APCuCache;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group APCU
|
||||||
|
*/
|
||||||
class APCuCacheTest extends MemoryCacheTest
|
class APCuCacheTest extends MemoryCacheTest
|
||||||
{
|
{
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
|
|
|
@ -7,6 +7,7 @@ use Friendica\Core\Config\Configuration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @requires extension memcache
|
* @requires extension memcache
|
||||||
|
* @group MEMCACHE
|
||||||
*/
|
*/
|
||||||
class MemcacheCacheTest extends MemoryCacheTest
|
class MemcacheCacheTest extends MemoryCacheTest
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,7 @@ use Psr\Log\NullLogger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @requires extension memcached
|
* @requires extension memcached
|
||||||
|
* @group MEMCACHED
|
||||||
*/
|
*/
|
||||||
class MemcachedCacheTest extends MemoryCacheTest
|
class MemcachedCacheTest extends MemoryCacheTest
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,6 +8,7 @@ use Friendica\Core\Config\Configuration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @requires extension redis
|
* @requires extension redis
|
||||||
|
* @group REDIS
|
||||||
*/
|
*/
|
||||||
class RedisCacheTest extends MemoryCacheTest
|
class RedisCacheTest extends MemoryCacheTest
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,6 +5,9 @@ namespace Friendica\Test\src\Core\Lock;
|
||||||
use Friendica\Core\Cache\APCuCache;
|
use Friendica\Core\Cache\APCuCache;
|
||||||
use Friendica\Core\Lock\CacheLock;
|
use Friendica\Core\Lock\CacheLock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group APCU
|
||||||
|
*/
|
||||||
class APCuCacheLockTest extends LockTest
|
class APCuCacheLockTest extends LockTest
|
||||||
{
|
{
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
|
|
|
@ -9,6 +9,7 @@ use Friendica\Core\Lock\CacheLock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @requires extension Memcache
|
* @requires extension Memcache
|
||||||
|
* @group MEMCACHE
|
||||||
*/
|
*/
|
||||||
class MemcacheCacheLockTest extends LockTest
|
class MemcacheCacheLockTest extends LockTest
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,6 +10,7 @@ use Psr\Log\NullLogger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @requires extension memcached
|
* @requires extension memcached
|
||||||
|
* @group MEMCACHED
|
||||||
*/
|
*/
|
||||||
class MemcachedCacheLockTest extends LockTest
|
class MemcachedCacheLockTest extends LockTest
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,7 @@ use Friendica\Core\Lock\CacheLock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @requires extension redis
|
* @requires extension redis
|
||||||
|
* @group REDIS
|
||||||
*/
|
*/
|
||||||
class RedisCacheLockTest extends LockTest
|
class RedisCacheLockTest extends LockTest
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user