From a39f256fa01a60387150b02d77189f5654078e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 25 Jan 2016 08:27:40 +0100 Subject: [PATCH 1/5] Remove PHP nightly build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no major PHP version nearby and this just consumes build power. Signed-off-by: Michal Čihař --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2b16c0ceff..9c67baf302 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,6 @@ php: - "5.6" - "5.5" - hhvm - - nightly sudo: false @@ -59,8 +58,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 From 56cb67e203d28c4af6859953673f582192c7f8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 25 Jan 2016 08:26:28 +0100 Subject: [PATCH 2/5] Improve Travis setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - move setups to external script - properly catch errors from conditional steps - install runkit using PECL Signed-off-by: Michal Čihař --- .travis.yml | 16 +++++++++------- test/install-browserstack | 4 ++++ test/install-runkit | 9 +++++++++ test/php-noprofile.ini | 3 +++ test/{travis.php.ini => php-runkit.ini} | 1 - test/start-local-server | 10 ++++++++++ 6 files changed, 35 insertions(+), 8 deletions(-) create mode 100755 test/install-runkit create mode 100644 test/php-noprofile.ini rename test/{travis.php.ini => php-runkit.ini} (85%) create mode 100755 test/start-local-server diff --git a/.travis.yml b/.travis.yml index 9c67baf302..b60b7c9f83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,22 +21,24 @@ 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 pecl 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 + - ant lint - set -e; if [ $TRAVIS_PHP_VERSION == "hhvm" ] ; then ant phpunit-hhvm ; diff --git a/test/install-browserstack b/test/install-browserstack index db4ab36fa8..3edcb274f2 100755 --- a/test/install-browserstack +++ b/test/install-browserstack @@ -2,6 +2,10 @@ set -e +if [ -z "$SELENIUM" ] ; then + exit 0 +fi + mkdir -p ~/browserstack cd ~/browserstack if [ ! -f BrowserStackLocal ] ; then diff --git a/test/install-runkit b/test/install-runkit new file mode 100755 index 0000000000..3f5bb43f07 --- /dev/null +++ b/test/install-runkit @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ "$TRAVIS_PHP_VERSION" = "nightly" -o "$TRAVIS_PHP_VERSION" = "7.0" ] ; then + exit 0 +fi + +pecl install runkit + +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/travis.php.ini b/test/php-runkit.ini similarity index 85% rename from test/travis.php.ini rename to test/php-runkit.ini index 1ed75b1261..0e8d6a21eb 100644 --- a/test/travis.php.ini +++ b/test/php-runkit.ini @@ -3,4 +3,3 @@ ; Load runkit and enabled override of internals extension=runkit.so runkit.internal_override=1 -xdebug.profiler_enable=0 diff --git a/test/start-local-server b/test/start-local-server new file mode 100755 index 0000000000..0a9655a9ea --- /dev/null +++ b/test/start-local-server @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +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 & From 4bb155d8745d347b637d8a3d033ea9b46106d84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 25 Jan 2016 09:03:09 +0100 Subject: [PATCH 3/5] Verbose script execution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/install-browserstack | 1 + test/install-runkit | 3 +++ test/start-local-server | 1 + 3 files changed, 5 insertions(+) diff --git a/test/install-browserstack b/test/install-browserstack index 3edcb274f2..7320dadb46 100755 --- a/test/install-browserstack +++ b/test/install-browserstack @@ -1,6 +1,7 @@ #!/bin/sh set -e +set -x if [ -z "$SELENIUM" ] ; then exit 0 diff --git a/test/install-runkit b/test/install-runkit index 3f5bb43f07..23ab4af996 100755 --- a/test/install-runkit +++ b/test/install-runkit @@ -4,6 +4,9 @@ if [ "$TRAVIS_PHP_VERSION" = "nightly" -o "$TRAVIS_PHP_VERSION" = "7.0" ] ; then exit 0 fi +set -e +set -x + pecl install runkit phpenv config-add test/php-runkit.ini diff --git a/test/start-local-server b/test/start-local-server index 0a9655a9ea..c76d374051 100755 --- a/test/start-local-server +++ b/test/start-local-server @@ -1,6 +1,7 @@ #!/bin/sh set -e +set -x if [ -z "$SELENIUM" ] ; then exit 0 From 56f9b323531017781ba74269376e01b765dbddc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 25 Jan 2016 09:46:24 +0100 Subject: [PATCH 4/5] No PECL on HHVM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/install-runkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/install-runkit b/test/install-runkit index 23ab4af996..469440e8a0 100755 --- a/test/install-runkit +++ b/test/install-runkit @@ -1,6 +1,6 @@ #!/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 From ee4d21eee4deed4c051d352a3873abe0caabd345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 25 Jan 2016 09:47:49 +0100 Subject: [PATCH 5/5] Do not load runkit extension twice in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/php-runkit.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/php-runkit.ini b/test/php-runkit.ini index 0e8d6a21eb..ee76560353 100644 --- a/test/php-runkit.ini +++ b/test/php-runkit.ini @@ -1,5 +1,7 @@ ; PHP configuration tweaks for tests on Travis -; Load runkit and enabled override of internals -extension=runkit.so +; Extension is automaticlaly enabled by PECL +; extension=runkit.so + +; Enable override of internal functions runkit.internal_override=1