From 4927c4e9146793cfba090fad84378b7fb790aeb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 13:55:54 +0100 Subject: [PATCH 01/28] Set environment in single place MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1cc4969027..00db052b3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ env: - TESTSUITE_BROWSERSTACK_USER=phpMyAdmin - TESTSUITE_USER=root - TESTSUITE_PASSWORD=root + - TESTSUITE_URL=http://127.0.0.1:8000 before_script: - export PATH=~/.composer/vendor/bin/:$PATH @@ -67,7 +68,6 @@ before_script: script: - ant locales - set -e; if [[ -z "$LINT" ]] ; then - export TESTSUITE_URL="http://127.0.0.1:8000" ; if [[ $TRAVIS_PHP_VERSION == "hhvm" ]] ; then ant phpunit-hhvm ; else From 1ae770ca1ba79cb326415791da364a671d16354b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 13:56:13 +0100 Subject: [PATCH 02/28] Move composer setup to separate phase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 00db052b3a..0fe9982fde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,10 +28,9 @@ env: before_script: - export PATH=~/.composer/vendor/bin/:$PATH - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" ; + - composer install --dev --no-interaction - set -e ; if [[ -z "$LINT" ]] ; then - composer install --dev --no-interaction ; - if [[ $TRAVIS_PHP_VERSION != "hhvm" ]] ; then git clone --depth=1 git://github.com/zenovich/runkit.git ; From 23c3a2d070f3e85c3d213a251d2cf35832e3a9d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 13:58:22 +0100 Subject: [PATCH 03/28] Simplify if statements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0fe9982fde..f7de29fb8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,13 +29,13 @@ before_script: - export PATH=~/.composer/vendor/bin/:$PATH - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" ; - composer install --dev --no-interaction - - set -e ; if [[ -z "$LINT" ]] ; then + - set -e ; if [ -z "$LINT" ] ; then - if [[ $TRAVIS_PHP_VERSION != "hhvm" ]] ; then + if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then git clone --depth=1 git://github.com/zenovich/runkit.git ; cd runkit ; - if [[ $TRAVIS_PHP_VERSION = "5.6" ]] ; then + if [ $TRAVIS_PHP_VERSION = "5.6" ] ; then wget https://github.com/zenovich/runkit/pull/71.diff ; patch -p1 < 71.diff ; fi ; @@ -51,7 +51,7 @@ before_script: fi ; - if [[ ! -z "$SELENIUM" ]] ; then + if [ ! -z "$SELENIUM" ] ; then php --server 127.0.0.1:8000 & @@ -66,11 +66,11 @@ before_script: script: - ant locales - - set -e; if [[ -z "$LINT" ]] ; then - if [[ $TRAVIS_PHP_VERSION == "hhvm" ]] ; then + - set -e; if [ -z "$LINT" ] ; then + if [ $TRAVIS_PHP_VERSION == "hhvm" ] ; then ant phpunit-hhvm ; else - if [[ ! -z "$SELENIUM" ]] ; then + if [ ! -z "$SELENIUM" ] ; then ant phpunit-nocoverage ; else ant phpunit ; @@ -81,8 +81,8 @@ script: fi after_script: - - if [[ -f build/logs/clover.xml ]] ; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml || true ; fi - - if [[ -f vendor/bin/coveralls ]] ; then php vendor/bin/coveralls -v || true ; fi + - if [ -f build/logs/clover.xml ] ; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml || true ; fi + - if [ -f vendor/bin/coveralls ] ; then php vendor/bin/coveralls -v || true ; fi matrix: allow_failures: From f07c5a4a0fedad4009efccc84f9ef26e23146c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 14:03:48 +0100 Subject: [PATCH 04/28] Install ocular using composer instead of wget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 4 +--- composer.json | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index f7de29fb8e..7125054a1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,8 +47,6 @@ before_script: phpenv config-add test/travis.php.ini ; - wget https://scrutinizer-ci.com/ocular.phar ; - fi ; if [ ! -z "$SELENIUM" ] ; then @@ -81,7 +79,7 @@ script: fi after_script: - - if [ -f build/logs/clover.xml ] ; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml || true ; fi + - if [ -f build/logs/clover.xml ] ; then php vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml || true ; fi - if [ -f vendor/bin/coveralls ] ; then php vendor/bin/coveralls -v || true ; fi matrix: diff --git a/composer.json b/composer.json index 117a2c855c..c78d034eb8 100644 --- a/composer.json +++ b/composer.json @@ -24,6 +24,7 @@ "require-dev": { "satooshi/php-coveralls": ">=0.6", "phpunit/phpunit": "<4.2", - "phpunit/phpunit-selenium": ">=1.2" + "phpunit/phpunit-selenium": ">=1.2", + "scrutinizer/ocular": ">=1.0.0" } } From 2489caebd7e5e3d28e29404bee89422f1fc6b5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 14:05:59 +0100 Subject: [PATCH 05/28] Move runkit installation to external script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes easier to read .travis.yml and also allows us to measure time it takes. Signed-off-by: Michal Čihař --- .travis.yml | 20 +------------------- test/install-runkit | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 19 deletions(-) create mode 100755 test/install-runkit diff --git a/.travis.yml b/.travis.yml index 7125054a1b..312e751f83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,26 +29,8 @@ before_script: - export PATH=~/.composer/vendor/bin/:$PATH - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" ; - composer install --dev --no-interaction + - if [ -z "$LINT" - a$TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi - set -e ; if [ -z "$LINT" ] ; then - - if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then - - git clone --depth=1 git://github.com/zenovich/runkit.git ; - cd runkit ; - if [ $TRAVIS_PHP_VERSION = "5.6" ] ; then - wget https://github.com/zenovich/runkit/pull/71.diff ; - patch -p1 < 71.diff ; - fi ; - phpize ; - ./configure ; - make ; - make install ; - cd .. ; - - phpenv config-add test/travis.php.ini ; - - fi ; - if [ ! -z "$SELENIUM" ] ; then php --server 127.0.0.1:8000 & diff --git a/test/install-runkit b/test/install-runkit new file mode 100755 index 0000000000..5e0523b9e3 --- /dev/null +++ b/test/install-runkit @@ -0,0 +1,15 @@ +#!/bin/sh + +git clone --depth=1 git://github.com/zenovich/runkit.git +cd runkit +if [ $TRAVIS_PHP_VERSION = "5.6" ] ; then + wget https://github.com/zenovich/runkit/pull/71.diff + patch -p1 < 71.diff +fi +phpize +./configure +make +make install +cd .. + +phpenv config-add test/travis.php.ini From 9bfb7dd35bf05e65bda790f5a8bb23af785f55e8 Mon Sep 17 00:00:00 2001 From: Nisarg Jhaveri Date: Thu, 4 Dec 2014 18:40:57 +0530 Subject: [PATCH 06/28] Better implementation of placeholder in dropdowns If something else is selected, show placeholder as disabled option. Previously it was ignoring `$active_choice` if placeholder is given. Signed-off-by: Nisarg Jhaveri --- libraries/Util.class.php | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 2e291c1701..34f6b80d57 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -2704,20 +2704,28 @@ class PMA_Util . (! empty($class) ? ' class="' . htmlspecialchars($class) . '"' : '') . '>'; - if (!empty($placeholder)) { - $result .= ''; - } + $resultOptions = ''; + $selected = false; foreach ($choices as $one_choice_value => $one_choice_label) { - $result .= ''; } - $result .= ''; + + if (!empty($placeholder)) { + $resultOptions = '' + . $resultOptions; + } + + $result .= $resultOptions + . ''; return $result; } From bceb08a20426bf060fd6563233955562039814fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 14:22:10 +0100 Subject: [PATCH 07/28] Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 312e751f83..4937098a21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,9 +27,9 @@ env: before_script: - export PATH=~/.composer/vendor/bin/:$PATH - - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" ; + - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" - composer install --dev --no-interaction - - if [ -z "$LINT" - a$TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi + - if [ -z "$LINT" -a $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi - set -e ; if [ -z "$LINT" ] ; then if [ ! -z "$SELENIUM" ] ; then From b4302373e611efaf3333337069dee5f1c892036e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 14:23:27 +0100 Subject: [PATCH 08/28] Move browserstack setup to external script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It makes it easier to manage and measure. Signed-off-by: Michal Čihař --- .travis.yml | 14 +------------- test/install-browserstack | 12 ++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) create mode 100755 test/install-browserstack diff --git a/.travis.yml b/.travis.yml index 4937098a21..a67e9c0e29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,19 +30,7 @@ before_script: - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" - composer install --dev --no-interaction - if [ -z "$LINT" -a $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi - - set -e ; if [ -z "$LINT" ] ; then - if [ ! -z "$SELENIUM" ] ; then - - php --server 127.0.0.1:8000 & - - wget https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip ; - unzip BrowserStackLocal-linux-x64.zip ; - ./BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & - - mysql -uroot -p$TESTSUITE_PASSWORD < examples/create_tables.sql ; - - fi ; - fi + - if [ -z "$LINT" -a -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi script: - ant locales diff --git a/test/install-browserstack b/test/install-browserstack new file mode 100755 index 0000000000..0151ab8afb --- /dev/null +++ b/test/install-browserstack @@ -0,0 +1,12 @@ +#!/bin/sh + +php --server 127.0.0.1:8000 & + +mkdir browserstack +cd browserstack +wget https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip +unzip BrowserStackLocal-linux-x64.zip +./BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 +cd .. + +mysql -uroot -p$TESTSUITE_PASSWORD < examples/create_tables.sql From e3ddf2ddebeb1166a6e6cd9af29fcffc8cdf2f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 14:45:13 +0100 Subject: [PATCH 09/28] Cache browserstack download MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 1 + test/install-browserstack | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a67e9c0e29..0fc2c1c73f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,3 +65,4 @@ matrix: cache: directories: - $HOME/.composer/cache/ + - $HOME/browserstack diff --git a/test/install-browserstack b/test/install-browserstack index 0151ab8afb..a75fcb3c86 100755 --- a/test/install-browserstack +++ b/test/install-browserstack @@ -1,12 +1,14 @@ -#!/bin/sh +#!/bin/bash php --server 127.0.0.1:8000 & -mkdir browserstack -cd browserstack -wget https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip -unzip BrowserStackLocal-linux-x64.zip +mkdir -p ~/browserstack +pushd ~/browserstack +if [ ! -f BrowserStackLocal ] ; then + wget https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip + unzip BrowserStackLocal-linux-x64.zip +fi ./BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 -cd .. +popd mysql -uroot -p$TESTSUITE_PASSWORD < examples/create_tables.sql From a4c2afaf45f12a1d5f2bf1a39db2bd1ed8acf38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 14:47:57 +0100 Subject: [PATCH 10/28] Directly clone correct runkit version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/install-runkit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/install-runkit b/test/install-runkit index 5e0523b9e3..e34b5510b6 100755 --- a/test/install-runkit +++ b/test/install-runkit @@ -1,11 +1,11 @@ #!/bin/sh -git clone --depth=1 git://github.com/zenovich/runkit.git -cd runkit if [ $TRAVIS_PHP_VERSION = "5.6" ] ; then - wget https://github.com/zenovich/runkit/pull/71.diff - patch -p1 < 71.diff + git clone --depth=1 git://github.com/adrianguenter/runkit.git +else: + git clone --depth=1 git://github.com/zenovich/runkit.git fi +cd runkit phpize ./configure make From d6559c9c574802d432a6d9163c5f966bb75400ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 14:52:18 +0100 Subject: [PATCH 11/28] Cache runkit build as well MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 1 + test/install-runkit | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0fc2c1c73f..ba9db00bc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -66,3 +66,4 @@ cache: directories: - $HOME/.composer/cache/ - $HOME/browserstack + - $HOME/runkit diff --git a/test/install-runkit b/test/install-runkit index e34b5510b6..9ead0cb171 100755 --- a/test/install-runkit +++ b/test/install-runkit @@ -1,15 +1,18 @@ -#!/bin/sh +#!/bin/bash -if [ $TRAVIS_PHP_VERSION = "5.6" ] ; then - git clone --depth=1 git://github.com/adrianguenter/runkit.git -else: - git clone --depth=1 git://github.com/zenovich/runkit.git +if [ ! -d ~/runkit/.git ] ; then + if [ $TRAVIS_PHP_VERSION = "5.6" ] ; then + git clone --depth=1 git://github.com/adrianguenter/runkit.git + else: + git clone --depth=1 git://github.com/zenovich/runkit.git + fi fi -cd runkit +pushd ~/runkit +git pull phpize ./configure make make install -cd .. +popd phpenv config-add test/travis.php.ini From 7dc3a76aae298f9f4e2898083abb002cd6e1abc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 14:56:35 +0100 Subject: [PATCH 12/28] Fix runkit caching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/install-runkit | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/install-runkit b/test/install-runkit index 9ead0cb171..6a9bd00d6f 100755 --- a/test/install-runkit +++ b/test/install-runkit @@ -1,13 +1,16 @@ #!/bin/bash -if [ ! -d ~/runkit/.git ] ; then +set -e + +mkdir -p ~/runkit +if [ ! -d ~/runkit/runkit/.git ] ; then if [ $TRAVIS_PHP_VERSION = "5.6" ] ; then - git clone --depth=1 git://github.com/adrianguenter/runkit.git + git clone --depth=1 git://github.com/adrianguenter/runkit.git ~/runkit/runkit else: - git clone --depth=1 git://github.com/zenovich/runkit.git + git clone --depth=1 git://github.com/zenovich/runkit.git ~/runkit/runkit fi fi -pushd ~/runkit +pushd ~/runkit/runkit git pull phpize ./configure From 084458720dc70d89c0f48f162a9cbb280de921a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 14:56:45 +0100 Subject: [PATCH 13/28] Fail on exit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/install-browserstack | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/install-browserstack b/test/install-browserstack index a75fcb3c86..7c5ea4e773 100755 --- a/test/install-browserstack +++ b/test/install-browserstack @@ -1,5 +1,7 @@ #!/bin/bash +set -e + php --server 127.0.0.1:8000 & mkdir -p ~/browserstack From 5da00dc8fe1d7e6eddbffc717cdb57245746004b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 15:01:58 +0100 Subject: [PATCH 14/28] Run PHP in background MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/install-browserstack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/install-browserstack b/test/install-browserstack index 7c5ea4e773..1940986349 100755 --- a/test/install-browserstack +++ b/test/install-browserstack @@ -2,7 +2,7 @@ set -e -php --server 127.0.0.1:8000 & +nohup php --server 127.0.0.1:8000 mkdir -p ~/browserstack pushd ~/browserstack From 9b919bcca7f821cb5af6b4a15ca9eb86d48714fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 15:25:47 +0100 Subject: [PATCH 15/28] Fix typo 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 6a9bd00d6f..8c13ecc0dc 100755 --- a/test/install-runkit +++ b/test/install-runkit @@ -6,7 +6,7 @@ mkdir -p ~/runkit if [ ! -d ~/runkit/runkit/.git ] ; then if [ $TRAVIS_PHP_VERSION = "5.6" ] ; then git clone --depth=1 git://github.com/adrianguenter/runkit.git ~/runkit/runkit - else: + else git clone --depth=1 git://github.com/zenovich/runkit.git ~/runkit/runkit fi fi From f2047699be3be12dce45c94bb592e0fda9a7bc71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 15:39:03 +0100 Subject: [PATCH 16/28] Show php log after tests are executed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 1 + test/install-browserstack | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ba9db00bc7..69c06638ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,6 +51,7 @@ script: after_script: - if [ -f build/logs/clover.xml ] ; then php vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml || true ; fi - if [ -f vendor/bin/coveralls ] ; then php vendor/bin/coveralls -v || true ; fi + - if [ -f php.log ] ; then cat php.log ; fi matrix: allow_failures: diff --git a/test/install-browserstack b/test/install-browserstack index 1940986349..47aa6f5ca5 100755 --- a/test/install-browserstack +++ b/test/install-browserstack @@ -2,7 +2,7 @@ set -e -nohup php --server 127.0.0.1:8000 +nohup php --server 127.0.0.1:8000 > php.log & mkdir -p ~/browserstack pushd ~/browserstack From f8939546bdef716d27a481c0873a47e5fc372131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 15:43:18 +0100 Subject: [PATCH 17/28] Do not cache runkit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The improvement is not noticeable in this case, so let's always use fresh copy. Signed-off-by: Michal Čihař --- test/install-runkit | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/test/install-runkit b/test/install-runkit index 8c13ecc0dc..4789479b61 100755 --- a/test/install-runkit +++ b/test/install-runkit @@ -2,16 +2,12 @@ set -e -mkdir -p ~/runkit -if [ ! -d ~/runkit/runkit/.git ] ; then - if [ $TRAVIS_PHP_VERSION = "5.6" ] ; then - git clone --depth=1 git://github.com/adrianguenter/runkit.git ~/runkit/runkit - else - git clone --depth=1 git://github.com/zenovich/runkit.git ~/runkit/runkit - fi +if [ $TRAVIS_PHP_VERSION = "5.6" ] ; then + git clone --depth=1 git://github.com/adrianguenter/runkit.git +else + git clone --depth=1 git://github.com/zenovich/runkit.git fi -pushd ~/runkit/runkit -git pull +pushd runkit phpize ./configure make From 88d2892f1e05ce21861cb1604434f34e50e5b344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 15:52:47 +0100 Subject: [PATCH 18/28] Supress success output from lint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index cbd3e2827d..41ab34e7ec 100644 --- a/build.xml +++ b/build.xml @@ -149,7 +149,7 @@ - + From 860282947356d6eb272351c80cfc1b588bfee222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 15:55:11 +0100 Subject: [PATCH 19/28] Merge lint run into testsuite run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It should be faster to run these in parallel, but given limited amount of workers, it's better to do more work in single run. The run takes longer, but overall time to run all tests is lower due to less waiting for free worker. Signed-off-by: Michal Čihař --- .travis.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 69c06638ce..0f7a28e482 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,6 @@ sudo: false env: matrix: - PHPUNIT_ARGS="--exclude-group selenium" - - LINT="yes" global: - secure: "TR3s7lHkREN706g+FeNXl1S0R2fpcI1H+n8USIkl5WBd7S2/NpsZlSfkrgnC7/xRBDXzHwuYd8JQQyAZyrqPEeLqIqlKzxIcTHOiJWGeR/YO7JXsr1Slt/nFqygpIyz8yOh3QIvX6FMzPsamBlUNhRvTAkd2wXPMBpXQlhTVmX8=" - TESTSUITE_BROWSERSTACK_USER=phpMyAdmin @@ -29,12 +28,13 @@ before_script: - export PATH=~/.composer/vendor/bin/:$PATH - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" - composer install --dev --no-interaction - - if [ -z "$LINT" -a $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi - - if [ -z "$LINT" -a -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi + - if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi + - if [ -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi script: - ant locales - - set -e; if [ -z "$LINT" ] ; then + - ant lint + - set -e; if [ $TRAVIS_PHP_VERSION == "hhvm" ] ; then ant phpunit-hhvm ; else @@ -43,9 +43,6 @@ script: else ant phpunit ; fi ; - fi ; - else - ant lint ; fi after_script: From f1d9ff99dce53915966fed726792edbf9b91fdde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 16:07:14 +0100 Subject: [PATCH 20/28] Start PHP from main script for selenium tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise the child script just hangs Signed-off-by: Michal Čihař --- .travis.yml | 1 + test/install-browserstack | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0f7a28e482..134cb639cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ before_script: - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" - composer install --dev --no-interaction - if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi + - if [ -n "$SELENIUM" ] ; then php --server 127.0.0.1:8000 > php.log & ; fi - if [ -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi script: diff --git a/test/install-browserstack b/test/install-browserstack index 47aa6f5ca5..49c93b2b5a 100755 --- a/test/install-browserstack +++ b/test/install-browserstack @@ -2,8 +2,6 @@ set -e -nohup php --server 127.0.0.1:8000 > php.log & - mkdir -p ~/browserstack pushd ~/browserstack if [ ! -f BrowserStackLocal ] ; then From 2e6614d45361b7363397b2d9f404ed035341a660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 16:12:05 +0100 Subject: [PATCH 21/28] Run clean as well MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 134cb639cd..3c100dd894 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,7 @@ before_script: - if [ -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi script: + - ant clean - ant locales - ant lint - set -e; From f9a9986b6d03a4561fdf190e0a2980975b32c963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 16:13:49 +0100 Subject: [PATCH 22/28] Fix syntax error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3c100dd894..83b9fa7436 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ before_script: - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" - composer install --dev --no-interaction - if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi - - if [ -n "$SELENIUM" ] ; then php --server 127.0.0.1:8000 > php.log & ; fi + - if [ -n "$SELENIUM" ] ; then php --server 127.0.0.1:8000 > php.log & fi - if [ -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi script: From c29e42627e23a8f482c4e5808ba5e1bd6e5e9098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 16:33:16 +0100 Subject: [PATCH 23/28] Simplify BrowserStack testing setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 5 ++++- test/install-browserstack | 7 ++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 83b9fa7436..f5dd228a04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,11 +26,14 @@ env: before_script: - export PATH=~/.composer/vendor/bin/:$PATH + - mysql -uroot -e "CREATE DATATBASE test" + - mysql -uroot < examples/create_tables.sql - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" - composer install --dev --no-interaction - if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi - - if [ -n "$SELENIUM" ] ; then php --server 127.0.0.1:8000 > php.log & 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" ] ; ./BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & fi script: - ant clean diff --git a/test/install-browserstack b/test/install-browserstack index 49c93b2b5a..db4ab36fa8 100755 --- a/test/install-browserstack +++ b/test/install-browserstack @@ -1,14 +1,11 @@ -#!/bin/bash +#!/bin/sh set -e mkdir -p ~/browserstack -pushd ~/browserstack +cd ~/browserstack if [ ! -f BrowserStackLocal ] ; then wget https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip unzip BrowserStackLocal-linux-x64.zip fi -./BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 -popd -mysql -uroot -p$TESTSUITE_PASSWORD < examples/create_tables.sql From 129007fc91de2b47126ede99e74a1f1debd13070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 16:36:33 +0100 Subject: [PATCH 24/28] Switch Selenium tests to PHP 5.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f5dd228a04..616b99c788 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,7 +63,7 @@ matrix: env: PHPUNIT_ARGS="--exclude-group selenium" fast_finish: true include: - - php: 5.5 + - php: 5.6 env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes" cache: directories: From 0fa659e3adc7a31deb5ed8c5793c8738a2e47211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 16:37:23 +0100 Subject: [PATCH 25/28] Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 616b99c788..9ada3d3f46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ env: before_script: - export PATH=~/.composer/vendor/bin/:$PATH - - mysql -uroot -e "CREATE DATATBASE test" + - mysql -uroot -e "CREATE DATABASE test" - mysql -uroot < examples/create_tables.sql - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" - composer install --dev --no-interaction From a7eb3ea927118675bedf36f968d11703bec2ff45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 16:39:22 +0100 Subject: [PATCH 26/28] Allow failure for Selenium tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9ada3d3f46..ea0796f34e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ after_script: matrix: allow_failures: - - php: 5.5 + - php: 5.6 env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes" - php: hhvm env: PHPUNIT_ARGS="--exclude-group selenium" From aca159e87dbb8823c565ad5c96778f0575f5c220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 16:44:45 +0100 Subject: [PATCH 27/28] Another syntax error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ea0796f34e..1fbfd49412 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ before_script: - 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" ] ; ./BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & fi + - if [ -n "$SELENIUM" ] ; then ./BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & fi script: - ant clean From d5f3e7dda3f0d27248bbf254be3b24caafc5af8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 4 Dec 2014 17:00:26 +0100 Subject: [PATCH 28/28] Fix path to BrowserStackLocak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1fbfd49412..fb0cfe14c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ before_script: - 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 ./BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & fi + - if [ -n "$SELENIUM" ] ; then ~/browserstack/BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & fi script: - ant clean