diff options
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 125 |
1 files changed, 65 insertions, 60 deletions
@@ -371,12 +371,9 @@ use_php() { PHP=`which php` PHP_CONFIG=`which php-config` PHPIZE=`which phpize` - rm $PHP - rm $PHP_CONFIG - rm $PHPIZE - cp "/usr/bin/php$VERSION" $PHP - cp "/usr/bin/php-config$VERSION" $PHP_CONFIG - cp "/usr/bin/phpize$VERSION" $PHPIZE + ln -sfn "/usr/local/php-${VERSION}/bin/php" $PHP + ln -sfn "/usr/local/php-${VERSION}/bin/php-config" $PHP_CONFIG + ln -sfn "/usr/local/php-${VERSION}/bin/phpize" $PHPIZE generate_php_test_proto } @@ -403,18 +400,13 @@ use_php_bc() { } build_php5.5() { - PHP=`which php` - PHP_CONFIG=`which php-config` - PHPIZE=`which phpize` - ln -sfn "/usr/local/php-5.5/bin/php" $PHP - ln -sfn "/usr/local/php-5.5/bin/php-config" $PHP_CONFIG - ln -sfn "/usr/local/php-5.5/bin/phpize" $PHPIZE - generate_php_test_proto + use_php 5.5 pushd php rm -rf vendor cp -r /usr/local/vendor-5.5 vendor - ./vendor/bin/phpunit + wget https://phar.phpunit.de/phpunit-4.8.0.phar -O /usr/bin/phpunit + phpunit popd pushd conformance # TODO(teboring): Add it back @@ -423,51 +415,21 @@ build_php5.5() { } build_php5.5_c() { - PHP=`which php` - PHP_CONFIG=`which php-config` - PHPIZE=`which phpize` - ln -sfn "/usr/local/php-5.5/bin/php" $PHP - ln -sfn "/usr/local/php-5.5/bin/php-config" $PHP_CONFIG - ln -sfn "/usr/local/php-5.5/bin/phpize" $PHPIZE - generate_php_test_proto - wget https://phar.phpunit.de/phpunit-old.phar -O /usr/bin/phpunit - + use_php 5.5 + wget https://phar.phpunit.de/phpunit-4.8.0.phar -O /usr/bin/phpunit cd php/tests && /bin/bash ./test.sh && cd ../.. pushd conformance - make test_php_c + # make test_php_c popd } build_php5.5_zts_c() { use_php_zts 5.5 - wget https://phar.phpunit.de/phpunit-old.phar -O /usr/bin/phpunit + wget https://phar.phpunit.de/phpunit-4.8.0.phar -O /usr/bin/phpunit cd php/tests && /bin/bash ./test.sh && cd ../.. pushd conformance - make test_php_c - popd -} - -build_php5.5_32() { - use_php_bc 5.5 - pushd php - rm -rf vendor - cp -r /usr/local/vendor-5.5 vendor - ./vendor/bin/phpunit - popd - # TODO(teboring): Add conformance test. - # pushd conformance - # make test_php - # popd -} - -build_php5.5_c_32() { - use_php_bc 5.5 - wget https://phar.phpunit.de/phpunit-old.phar -O /usr/bin/phpunit - cd php/tests && /bin/bash ./test.sh && cd ../.. - # TODO(teboring): Add conformance test. - # pushd conformance # make test_php_c - # popd + popd } build_php5.6() { @@ -475,7 +437,8 @@ build_php5.6() { pushd php rm -rf vendor cp -r /usr/local/vendor-5.6 vendor - ./vendor/bin/phpunit + wget https://phar.phpunit.de/phpunit-5.7.0.phar -O /usr/bin/phpunit + phpunit popd pushd conformance # TODO(teboring): Add it back @@ -485,9 +448,19 @@ build_php5.6() { build_php5.6_c() { use_php 5.6 + wget https://phar.phpunit.de/phpunit-5.7.0.phar -O /usr/bin/phpunit cd php/tests && /bin/bash ./test.sh && cd ../.. pushd conformance - make test_php_c + # make test_php_c + popd +} + +build_php5.6_zts_c() { + use_php_zts 5.6 + wget https://phar.phpunit.de/phpunit-5.7.0.phar -O /usr/bin/phpunit + cd php/tests && /bin/bash ./test.sh && cd ../.. + pushd conformance + # make test_php_c popd } @@ -511,7 +484,7 @@ build_php5.6_mac() { # Test cd php/tests && /bin/bash ./test.sh && cd ../.. pushd conformance - make test_php_c + # make test_php_c popd } @@ -520,7 +493,8 @@ build_php7.0() { pushd php rm -rf vendor cp -r /usr/local/vendor-7.0 vendor - ./vendor/bin/phpunit + wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit + phpunit popd pushd conformance # TODO(teboring): Add it back @@ -530,9 +504,43 @@ build_php7.0() { build_php7.0_c() { use_php 7.0 + wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit cd php/tests && /bin/bash ./test.sh && cd ../.. pushd conformance - make test_php_c + # make test_php_c + popd +} + +build_php7.0_zts_c() { + use_php_zts 7.0 + wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit + cd php/tests && /bin/bash ./test.sh && cd ../.. + pushd conformance + # make test_php_c + popd +} + +build_php7.0_mac() { + generate_php_test_proto + # Install PHP + curl -s https://php-osx.liip.ch/install.sh | bash -s 7.0 + PHP_FOLDER=`find /usr/local -type d -name "php7-7.0*"` # The folder name may change upon time + export PATH="$PHP_FOLDER/bin:$PATH" + + # Install phpunit + curl https://phar.phpunit.de/phpunit-5.6.0.phar -L -o phpunit.phar + chmod +x phpunit.phar + sudo mv phpunit.phar /usr/local/bin/phpunit + + # Install valgrind + echo "#! /bin/bash" > valgrind + chmod ug+x valgrind + sudo mv valgrind /usr/local/bin/valgrind + + # Test + cd php/tests && /bin/bash ./test.sh && cd ../.. + pushd conformance + # make test_php_c popd } @@ -542,13 +550,10 @@ build_php_all() { build_php7.0 build_php5.5_c build_php5.6_c - # build_php7.0_c + build_php7.0_c build_php5.5_zts_c -} - -build_php_all_32() { - build_php5.5_32 - build_php5.5_c_32 + build_php5.6_zts_c + build_php7.0_zts_c } # Note: travis currently does not support testing more than one language so the |