Merge pull request #2048 from nextcloud/stable10-update-containers

[stable10] Update containers to latest version
This commit is contained in:
Morris Jobke 2016-11-08 14:37:20 +01:00 committed by GitHub
commit 9071fd57d5
4 changed files with 51 additions and 55 deletions

View File

@ -3,14 +3,14 @@ pipeline:
image: plugins/git
depth: 1
jsunit:
image: nextcloudci/jsunit:1.0.6
image: nextcloudci/jsunit:jsunit-5
commands:
- ./autotest-js.sh
when:
matrix:
TESTS: jsunit
nodb-php5.4:
image: nextcloudci/php5.4:1.0.7
image: nextcloudci/php5.4:php5.4-5
commands:
- NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
when:
@ -18,7 +18,7 @@ pipeline:
DB: NODB
PHP: 5.4
nodb-php5.5:
image: nextcloudci/php5.5:1.0.7
image: nextcloudci/php5.5:php5.5-5
commands:
- NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
when:
@ -26,7 +26,7 @@ pipeline:
DB: NODB
PHP: 5.5
app-check-code:
image: nextcloudci/php7.0:php7.0-2
image: nextcloudci/php7.0:php7.0-6
commands:
- ./occ app:check-code admin_audit
- ./occ app:check-code comments
@ -36,7 +36,7 @@ pipeline:
matrix:
TESTS: app-check-code
syntax-php5.4:
image: nextcloudci/php5.4:1.0.14
image: nextcloudci/php5.4:php5.4-5
commands:
- composer install
- ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .
@ -44,7 +44,7 @@ pipeline:
matrix:
TESTS: syntax-php5.4
syntax-php5.5:
image: nextcloudci/php5.5:1.0.14
image: nextcloudci/php5.5:php5.5-5
commands:
- composer install
- ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .
@ -52,7 +52,7 @@ pipeline:
matrix:
TESTS: syntax-php5.5
syntax-php5.6:
image: nextcloudci/php5.6:php5.6-2
image: nextcloudci/php5.6:php5.6-7
commands:
- composer install
- ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .
@ -60,7 +60,7 @@ pipeline:
matrix:
TESTS: syntax-php5.6
syntax-php7.0:
image: nextcloudci/php7.0:php7.0-2
image: nextcloudci/php7.0:php7.0-6
commands:
- composer install
- ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .
@ -68,7 +68,7 @@ pipeline:
matrix:
TESTS: syntax-php7.0
litmus-v1:
image: nextcloudci/litmus-php7.0:litmus-php7.0-2
image: nextcloudci/litmus-php7.0:litmus-php7.0-4
commands:
- bash tests/travis/install.sh sqlite
- bash apps/dav/tests/travis/litmus-v1/script.sh
@ -76,7 +76,7 @@ pipeline:
matrix:
TESTS: litmus-v1
litmus-v2:
image: nextcloudci/litmus-php7.0:litmus-php7.0-2
image: nextcloudci/litmus-php7.0:litmus-php7.0-4
commands:
- bash tests/travis/install.sh sqlite
- bash apps/dav/tests/travis/litmus-v2/script.sh
@ -84,7 +84,7 @@ pipeline:
matrix:
TESTS: litmus-v2
caldavtester:
image: nextcloudci/litmus-php7.0:litmus-php7.0-2
image: nextcloudci/litmus-php7.0:litmus-php7.0-4
commands:
- bash tests/travis/install.sh sqlite
- bash apps/dav/tests/travis/caldav/install.sh
@ -93,7 +93,7 @@ pipeline:
matrix:
TESTS: caldavtester
carddavtester:
image: nextcloudci/litmus-php7.0:litmus-php7.0-2
image: nextcloudci/litmus-php7.0:litmus-php7.0-4
commands:
- bash tests/travis/install.sh sqlite
- bash apps/dav/tests/travis/carddav/install.sh
@ -102,7 +102,7 @@ pipeline:
matrix:
TESTS: carddavtester
nodb-php5.6:
image: nextcloudci/php5.6:1.0.6
image: nextcloudci/php5.6:php5.6-7
commands:
- NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
when:
@ -110,7 +110,7 @@ pipeline:
DB: NODB
PHP: 5.6
nodb-php7.0:
image: nextcloudci/php7.0:1.0.9
image: nextcloudci/php7.0:php7.0-6
commands:
- NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
when:
@ -118,7 +118,7 @@ pipeline:
DB: NODB
PHP: "7.0"
sqlite-php5.4:
image: nextcloudci/php5.4:1.0.7
image: nextcloudci/php5.4:php5.4-5
commands:
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
when:
@ -126,7 +126,7 @@ pipeline:
DB: sqlite
PHP: 5.4
sqlite-php5.5:
image: nextcloudci/php5.5:1.0.7
image: nextcloudci/php5.5:php5.5-5
commands:
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
when:
@ -134,7 +134,7 @@ pipeline:
DB: sqlite
PHP: 5.5
sqlite-php5.6:
image: nextcloudci/php5.6:1.0.6
image: nextcloudci/php5.6:php5.6-7
commands:
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
when:
@ -142,7 +142,7 @@ pipeline:
DB: sqlite
PHP: 5.6
sqlite-php7.0:
image: nextcloudci/php7.0:1.0.9
image: nextcloudci/php7.0:php7.0-6
commands:
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
when:
@ -150,7 +150,7 @@ pipeline:
DB: sqlite
PHP: "7.0"
mysql-php5.6:
image: nextcloudci/php5.6:1.0.6
image: nextcloudci/php5.6:php5.6-7
commands:
- sleep 15 # gives the database enough time to initialize
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysql
@ -159,7 +159,7 @@ pipeline:
DB: mysql
PHP: 5.6
postgres-php5.6:
image: nextcloudci/php5.6:1.0.6
image: nextcloudci/php5.6:php5.6-7
commands:
- sleep 10 # gives the database enough time to initialize
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh pgsql
@ -168,7 +168,7 @@ pipeline:
DB: postgres
PHP: 5.6
integration:
image: nextcloudci/php7.0:1.0.9
image: nextcloudci/php7.0:php7.0-6
commands:
- ./occ maintenance:install --admin-pass=admin
- cd build/integration

View File

@ -137,23 +137,6 @@ class LargeFileHelper {
return null;
}
/**
* @brief Tries to get the size of a file via the Windows DOM extension.
*
* @param string $filename Path to the file.
*
* @return null|int|float Number of bytes as number (float or int) or
* null on failure.
*/
public function getFileSizeViaCOM($filename) {
if (class_exists('COM')) {
$fsObj = new \COM("Scripting.FileSystemObject");
$file = $fsObj->GetFile($filename);
return 0 + $file->Size;
}
return null;
}
/**
* @brief Tries to get the size of a file via an exec() call.
*

View File

@ -88,7 +88,21 @@ class APCu extends Cache implements IMemcache {
*/
public function inc($key, $step = 1) {
$this->add($key, 0);
return apcu_inc($this->getPrefix() . $key, $step);
/**
* TODO - hack around a PHP 7 specific issue in APCu
*
* on PHP 7 the apcu_inc method on a non-existing object will increment
* "0" and result in "1" as value - therefore we check for existence
* first
*
* on PHP 5.6 this is not the case
*
* see https://github.com/krakjoe/apcu/issues/183#issuecomment-244038221
* for details
*/
return apcu_exists($this->getPrefix() . $key)
? apcu_inc($this->getPrefix() . $key, $step)
: false;
}
/**
@ -99,7 +113,21 @@ class APCu extends Cache implements IMemcache {
* @return int | bool
*/
public function dec($key, $step = 1) {
return apcu_dec($this->getPrefix() . $key, $step);
/**
* TODO - hack around a PHP 7 specific issue in APCu
*
* on PHP 7 the apcu_dec method on a non-existing object will decrement
* "0" and result in "-1" as value - therefore we check for existence
* first
*
* on PHP 5.6 this is not the case
*
* see https://github.com/krakjoe/apcu/issues/183#issuecomment-244038221
* for details
*/
return apcu_exists($this->getPrefix() . $key)
? apcu_dec($this->getPrefix() . $key, $step)
: false;
}
/**

View File

@ -54,21 +54,6 @@ class LargeFileHelperGetFileSizeTest extends TestCase {
);
}
/**
* @dataProvider dataFileNameProvider
*/
public function testGetFileSizeViaCOM($filename, $fileSize) {
if (!extension_loaded('COM')) {
$this->markTestSkipped(
'The PHP Windows COM extension is required for this test.'
);
}
$this->assertSame(
$fileSize,
$this->helper->getFileSizeViaCOM($filename)
);
}
/**
* @dataProvider dataFileNameProvider
*/