1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-11-30 04:19:30 +01:00

Run test_old against php-src on travis

This commit is contained in:
Nikita Popov 2016-04-07 06:37:47 +02:00
parent 8cacc85913
commit 4252ffa43e
3 changed files with 13 additions and 0 deletions

View File

@ -25,6 +25,7 @@ matrix:
script: script:
if [ $TRAVIS_PHP_VERSION = '5.6' ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; else vendor/bin/phpunit; fi if [ $TRAVIS_PHP_VERSION = '5.6' ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; else vendor/bin/phpunit; fi
if [ $TRAVIS_PHP_VERSION = '7.0' ]; then test_old/run-php-src.sh; fi
after_success: after_success:
if [ $TRAVIS_PHP_VERSION = '5.6' ]; then php vendor/bin/coveralls; fi if [ $TRAVIS_PHP_VERSION = '5.6' ]; then php vendor/bin/coveralls; fi

4
test_old/run-php-src.sh Executable file
View File

@ -0,0 +1,4 @@
wget -q https://github.com/php/php-src/archive/php-7.0.5.tar.gz
mkdir -p ./data/php-src
tar -xzf ./php-7.0.5.tar.gz -C ./data/php-src --strip-components=1
php test_old/run.php --verbose --no-progress PHP7 ./data/php-src

View File

@ -91,6 +91,10 @@ switch ($testType) {
# pretty print difference due to nop statements # pretty print difference due to nop statements
| ext.mbstring.tests.htmlent | ext.mbstring.tests.htmlent
| ext.standard.tests.file.fread_basic | ext.standard.tests.file.fread_basic
# tests using __halt_compiler as semi reserved keyword
| Zend.tests.grammar.semi_reserved_001
| Zend.tests.grammar.semi_reserved_002
| Zend.tests.grammar.semi_reserved_005
)\.phpt$~x', $file)) { )\.phpt$~x', $file)) {
return null; return null;
} }
@ -188,8 +192,10 @@ foreach (new RecursiveIteratorIterator(
} }
if (0 === $parseFail && 0 === $ppFail && 0 === $compareFail) { if (0 === $parseFail && 0 === $ppFail && 0 === $compareFail) {
$exit = 0;
echo "\n\n", 'All tests passed.', "\n"; echo "\n\n", 'All tests passed.', "\n";
} else { } else {
$exit = 1;
echo "\n\n", '==========', "\n\n", 'There were: ', "\n"; echo "\n\n", '==========', "\n\n", 'There were: ', "\n";
if (0 !== $parseFail) { if (0 !== $parseFail) {
echo ' ', $parseFail, ' parse failures.', "\n"; echo ' ', $parseFail, ' parse failures.', "\n";
@ -213,3 +219,5 @@ echo "\n",
"\n", "\n",
'Total time: ', microtime(true) - $totalStartTime, "\n", 'Total time: ', microtime(true) - $totalStartTime, "\n",
'Maximum memory usage: ', memory_get_peak_usage(true), "\n"; 'Maximum memory usage: ', memory_get_peak_usage(true), "\n";
exit($exit);