From 4252ffa43e797c61d7fba2a2c579ad685fc0ce90 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 7 Apr 2016 06:37:47 +0200 Subject: [PATCH] Run test_old against php-src on travis --- .travis.yml | 1 + test_old/run-php-src.sh | 4 ++++ test_old/run.php | 8 ++++++++ 3 files changed, 13 insertions(+) create mode 100755 test_old/run-php-src.sh diff --git a/.travis.yml b/.travis.yml index fddd509..4197cd7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,7 @@ matrix: 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 = '7.0' ]; then test_old/run-php-src.sh; fi after_success: if [ $TRAVIS_PHP_VERSION = '5.6' ]; then php vendor/bin/coveralls; fi diff --git a/test_old/run-php-src.sh b/test_old/run-php-src.sh new file mode 100755 index 0000000..0df442b --- /dev/null +++ b/test_old/run-php-src.sh @@ -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 diff --git a/test_old/run.php b/test_old/run.php index f410675..c493f2e 100644 --- a/test_old/run.php +++ b/test_old/run.php @@ -91,6 +91,10 @@ switch ($testType) { # pretty print difference due to nop statements | ext.mbstring.tests.htmlent | 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)) { return null; } @@ -188,8 +192,10 @@ foreach (new RecursiveIteratorIterator( } if (0 === $parseFail && 0 === $ppFail && 0 === $compareFail) { + $exit = 0; echo "\n\n", 'All tests passed.', "\n"; } else { + $exit = 1; echo "\n\n", '==========', "\n\n", 'There were: ', "\n"; if (0 !== $parseFail) { echo ' ', $parseFail, ' parse failures.', "\n"; @@ -213,3 +219,5 @@ echo "\n", "\n", 'Total time: ', microtime(true) - $totalStartTime, "\n", 'Maximum memory usage: ', memory_get_peak_usage(true), "\n"; + +exit($exit);