diff options
author | Remi Collet <remi@remirepo.net> | 2020-02-10 17:34:11 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-02-10 17:34:11 +0100 |
commit | aabab6cd5f5eb2a2dfdc9a96f344879012b67050 (patch) | |
tree | 9f0ea2c292bf0b694ae60fedb07d007947437adc /php-cakephp4.spec | |
parent | 7c0216f8ab9c7896fced870bcd5669430654c449 (diff) |
run full test suite
Diffstat (limited to 'php-cakephp4.spec')
-rw-r--r-- | php-cakephp4.spec | 95 |
1 files changed, 48 insertions, 47 deletions
diff --git a/php-cakephp4.spec b/php-cakephp4.spec index 77122d2..cd7b5d4 100644 --- a/php-cakephp4.spec +++ b/php-cakephp4.spec @@ -28,7 +28,7 @@ Name: php-%{pk_vendor}%{major} Version: 4.0.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: The CakePHP framework License: MIT @@ -601,13 +601,36 @@ mv chronos-*/tests tests2 %build +: ===== Generate autoloader for full framework +cat << 'EOF' | tee src/autoload.php +<?php +require_once '%{php_home}/Fedora/Autoloader/autoload.php'; + +\Fedora\Autoloader\Autoload::addPsr4('Cake\\', __DIR__); +\Fedora\Autoloader\Dependencies::required([ + __DIR__ . '/Chronos/carbon_compat.php', + __DIR__ . '/Core/functions.php', + __DIR__ . '/Collection/functions.php', + __DIR__ . '/I18n/functions.php', + __DIR__ . '/Utility/bootstrap.php', + '%{php_home}/Aura/Intl/autoload.php', + '%{php_home}/Psr/Log/autoload.php', + '%{php_home}/Psr/SimpleCache/autoload.php', + '%{php_home}/Psr/Http/Client/autoload.php', + '%{php_home}/Psr/Http/Message/autoload.php', + '%{php_home}/Psr/Http/Server/autoload.php', + '%{php_home}/Psr/Http/Server/middleware-autoload.php', + '%{php_home}/Composer/CaBundle/autoload.php', + '%{php_home}/Laminas/Diactoros2/autoload.php', + '%{php_home}/Laminas/HttpHandlerRunner/autoload.php', +]); +EOF : ===== Generate test autoloader for full framework mkdir vendor cat << 'EOF' | tee vendor/autoload.php <?php -require_once '%{php_home}/Fedora/Autoloader/autoload.php'; +require_once dirname(__DIR__) . '/src/autoload.php'; -\Fedora\Autoloader\Autoload::addPsr4('Cake\\', dirname(__DIR__).'/src'); \Fedora\Autoloader\Autoload::addPsr4('Cake\\Test\\', dirname(__DIR__).'/tests'); \Fedora\Autoloader\Autoload::addPsr4('Cake\\Chronos\\Test\\', dirname(__DIR__).'/tests2'); \Fedora\Autoloader\Autoload::addPsr4('TestApp\\', dirname(__DIR__).'/tests/test_app/TestApp'); @@ -615,25 +638,10 @@ require_once '%{php_home}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('TestPlugin\\Test\\', dirname(__DIR__).'/tests/test_app/Plugin/TestPlugin/tests'); \Fedora\Autoloader\Autoload::addPsr4('TestPluginTwo\\', dirname(__DIR__).'/tests/test_app/Plugin/TestPluginTwo/src'); \Fedora\Autoloader\Autoload::addPsr4('Company\\TestPluginThree\\', dirname(__DIR__).'/tests/test_app/Plugin/Company/TestPluginThree/src'); -\Fedora\Autoloader\Autoload::addPsr4('TCompany\\TestPluginThree\\Test\\', dirname(__DIR__).'/tests/test_app/Plugin/Company/TestPluginThree/tests'); +\Fedora\Autoloader\Autoload::addPsr4('Company\\TestPluginThree\\Test\\', dirname(__DIR__).'/tests/test_app/Plugin/Company/TestPluginThree/tests'); \Fedora\Autoloader\Autoload::addPsr4('ParentPlugin\\', dirname(__DIR__).'/tests/test_app/Plugin/ParentPlugin/src'); \Fedora\Autoloader\Autoload::addPsr4('PluginJs\\', dirname(__DIR__).'/tests/test_app/Plugin/PluginJs/src'); \Fedora\Autoloader\Dependencies::required([ - dirname(__DIR__).'/src/Chronos/carbon_compat.php', - dirname(__DIR__).'/src/Core/functions.php', - dirname(__DIR__).'/src/Collection/functions.php', - dirname(__DIR__).'/src/I18n/functions.php', - dirname(__DIR__).'/src/Utility/bootstrap.php', - '%{php_home}/Aura/Intl/autoload.php', - '%{php_home}/Psr/Log/autoload.php', - '%{php_home}/Psr/SimpleCache/autoload.php', - '%{php_home}/Psr/Http/Client/autoload.php', - '%{php_home}/Psr/Http/Message/autoload.php', - '%{php_home}/Psr/Http/Server/autoload.php', - '%{php_home}/Psr/Http/Server/middleware-autoload.php', - '%{php_home}/Composer/CaBundle/autoload.php', - '%{php_home}/Laminas/Diactoros2/autoload.php', - '%{php_home}/Laminas/HttpHandlerRunner/autoload.php', '%{php_home}/org/bovigo/vfs/autoload.php', ]); EOF @@ -930,38 +938,28 @@ exit (class_exists("Cake\\Validation\\Validator") ? 0 : 1); ' %if %{with_tests} -: Run upstream test suites -export LANG=fr_FR.UTF-8 -ret=0 -phpunit8 tests/TestCase/Cache --verbose || ret=1 -phpunit8 tests2 --verbose || ret=1 -phpunit8 tests/TestCase/Collection --verbose || ret=1 -phpunit8 tests/TestCase/Console \ - --filter '^((?!(testDataAvailable)).)*$' \ - --verbose || ret=1 -phpunit8 tests/TestCase/Core --verbose || ret=1 +: Fix path +sed -e 's:vendor/phpunit/phpunit/src/::' -i \ + tests/TestCase/Error/Middleware/ErrorHandlerMiddlewareTest.php \ + tests/TestCase/Error/ErrorHandlerTest.php + %if 0%{?rhel} == 6 : skip suite as sqlite is too old -%else -phpunit8 tests/TestCase/Database \ - --filter '^((?!(testMarshal)).)*$' \ - --verbose || ret=1 -phpunit8 tests/TestCase/Datasource --verbose || ret=1 +rm -rf tests/TestCase/Datasource %endif -phpunit8 tests/TestCase/Event --verbose || ret=1 -phpunit8 tests/TestCase/Filesystem --verbose || ret=1 -phpunit8 tests/TestCase/Form --verbose || ret=1 -phpunit8 tests/TestCase/Http \ - --filter '^((?!(CspMiddlewareTest)).)*$' \ - --verbose || ret=1 -phpunit8 tests/TestCase/I18n --verbose || ret=1 -phpunit8 tests/TestCase/Log --verbose || ret=1 -phpunit8 tests/TestCase/ORM --verbose || ret=1 -phpunit8 tests/TestCase/Utility --verbose || ret=1 -# testEmailDeep is online -phpunit8 tests/TestCase/Validation \ - --filter '^((?!(testEmailDeep)).)*$' \ + +export LANG=fr_FR.UTF-8 +ret=0 +: Run chronos test suite +phpunit8 tests2 --verbose || ret=1 + +: Run cakephp test suite +# testEmailDeep is online +# CspMiddlewareTest paragonie/csp-builder not packaged +phpunit8 tests/TestCase \ + --filter '^((?!(CspMiddlewareTest|testEmailDeep)).)*$' \ --verbose || ret=1 + exit $ret %else : Test suite disabled @@ -1128,6 +1126,9 @@ exit $ret %changelog +* Mon Feb 10 2020 Remi Collet <remi@remirepo.net> - 4.0.3-4 +- run full test suite + * Mon Feb 10 2020 Remi Collet <remi@remirepo.net> - 4.0.3-3 - add Form and ORM components |