Skip to content

Fixed tests on Windows systems #410

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

Closed
wants to merge 5 commits into from
Closed

Fixed tests on Windows systems #410

wants to merge 5 commits into from

Conversation

javiereguiluz
Copy link
Member

Trying to fix the AppVeyor issues by reusing Symfony's appveyor.yml file.

clone_folder: c:\projects\symfony-demo

cache:
- '%LOCALAPPDATA%\Composer\files'
- c:\projects\symfony\composer.phar
Copy link
Member

@stof stof Dec 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path should be adapted

- echo extension=php_fileinfo.dll >> php.ini-max
- echo extension=php_pdo_sqlite.dll >> php.ini-max
- echo extension=php_curl.dll >> php.ini-max
- echo curl.cainfo=c:\php\cacert.pem >> php.ini-max
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need the distinction between ini-max and ini-min for the demo

- php ./vendor/bin/phpunit --verbose
- cd c:\projects\symfony-demo
- SET X=0
- copy /Y c:\php\php.ini-min c:\php\php.ini
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to test twice with different php.ini

- SET COMPOSER_NO_INTERACTION=1
- SET SYMFONY_DEPRECATIONS_HELPER=strict
- SET ANSICON=121x90 (121x90)
- SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is useless. It is specific to the PHPUnit testsuite

clone_folder: c:\projects\symfony-demo

cache:
- '%LOCALAPPDATA%\Composer\files'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keeping the composer cache would still be a good idea though (Symfony does not do it due to the magic it does regarding subtree packages built on the fly, but you can do it)

clone_folder: c:\projects\symfony-demo

cache:
- '%LOCALAPPDATA%\Composer\files'
- c:\projects\symfony-demo\composer.phar
- .phpunit -> phpunit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is useless too, as you don't have such special phpunit install

- cd c:\projects\symfony-demo
- SET X=0
- php vendor/bin/phpunit || SET X=!errorlevel!
- exit %X%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove all the magic regarding X here, as you don't need to run several test commands

@javiereguiluz
Copy link
Member Author

@stof thanks for your detailed review! This file is getting really polished 😁

- cd %APPVEYOR_BUILD_FOLDER%
- php ./vendor/bin/phpunit --verbose
- cd c:\projects\symfony-demo
- php vendor/bin/phpunit || SET X=!errorlevel!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you forgot to remove the || SET X=!errorlevel! part (which is a good way to ensure that the build stay green 😄 as you turn failures into success currently)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants