diff --git a/.travis.yml b/.travis.yml index be56ded976..90cac51c52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,6 @@ php: - "5.6" - "5.5" - hhvm - - nightly sudo: false @@ -22,22 +21,23 @@ env: - TESTSUITE_PASSWORD=root - TESTSUITE_URL=http://127.0.0.1:8000 +install: + - pip install --user codecov + - ./test/install-runkit + - ./test/install-browserstack + - composer install --dev --no-interaction + before_script: + - phpenv config-add test/php-noprofile.ini - export PATH=~/.composer/vendor/bin/:$PATH - mysql -uroot -e "CREATE DATABASE test" - mysql -uroot < sql/create_tables.sql - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" - - composer install --dev --no-interaction - - pip install --user codecov - - if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi - - if [ -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi - - if [ -n "$SELENIUM" ] ; then php --server 127.0.0.1:8000 > php.log & fi - - if [ -n "$SELENIUM" ] ; then ~/browserstack/BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & fi + - ./test/start-local-server script: - ant clean - ant locales - - if [ -z "$SELENIUM" ] ; then ant lint ; fi - set -e; if [ $TRAVIS_PHP_VERSION == "hhvm" ] ; then ant phpunit-hhvm ; @@ -45,6 +45,7 @@ script: if [ ! -z "$SELENIUM" ] ; then ant phpunit-nocoverage ; else + ant lint ; ant phpunit ; fi ; fi @@ -59,8 +60,6 @@ matrix: allow_failures: - php: 5.6 env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes" - - php: nightly - env: PHPUNIT_ARGS="--exclude-group selenium" fast_finish: true include: - php: 5.6 diff --git a/test/install-browserstack b/test/install-browserstack index db4ab36fa8..7320dadb46 100755 --- a/test/install-browserstack +++ b/test/install-browserstack @@ -1,6 +1,11 @@ #!/bin/sh set -e +set -x + +if [ -z "$SELENIUM" ] ; then + exit 0 +fi mkdir -p ~/browserstack cd ~/browserstack diff --git a/test/install-runkit b/test/install-runkit index 78d5deaa05..469440e8a0 100755 --- a/test/install-runkit +++ b/test/install-runkit @@ -1,21 +1,12 @@ #!/bin/bash -if [ $TRAVIS_PHP_VERSION = "nightly" -o $TRAVIS_PHP_VERSION = "7.0" ] ; then +if [ "$TRAVIS_PHP_VERSION" = "nightly" -o "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "7.0" ] ; then exit 0 fi - set -e +set -x -git clone --depth=100 git://github.com/zenovich/runkit.git +pecl install runkit -pushd runkit -git checkout c337393762d54cf6df305cf8e92dac3a162157f4 - -phpize -./configure -make -make install -popd - -phpenv config-add test/travis.php.ini +phpenv config-add test/php-runkit.ini diff --git a/test/php-noprofile.ini b/test/php-noprofile.ini new file mode 100644 index 0000000000..2ab76d36b6 --- /dev/null +++ b/test/php-noprofile.ini @@ -0,0 +1,3 @@ +; PHP configuration tweaks for tests on Travis + +xdebug.profiler_enable=0 diff --git a/test/php-runkit.ini b/test/php-runkit.ini new file mode 100644 index 0000000000..ee76560353 --- /dev/null +++ b/test/php-runkit.ini @@ -0,0 +1,7 @@ +; PHP configuration tweaks for tests on Travis + +; Extension is automaticlaly enabled by PECL +; extension=runkit.so + +; Enable override of internal functions +runkit.internal_override=1 diff --git a/test/start-local-server b/test/start-local-server new file mode 100755 index 0000000000..c76d374051 --- /dev/null +++ b/test/start-local-server @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e +set -x + +if [ -z "$SELENIUM" ] ; then + exit 0 +fi + +php --server 127.0.0.1:8000 > php.log & +~/browserstack/BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & diff --git a/test/travis.php.ini b/test/travis.php.ini deleted file mode 100644 index 1ed75b1261..0000000000 --- a/test/travis.php.ini +++ /dev/null @@ -1,6 +0,0 @@ -; PHP configuration tweaks for tests on Travis - -; Load runkit and enabled override of internals -extension=runkit.so -runkit.internal_override=1 -xdebug.profiler_enable=0