diff --git a/.travis.yml b/.travis.yml index 05f516f24d..9f83839c60 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ # - run lint for every PHP version # - run Selenium for single PHP version +dist: trusty + language: php services: @@ -13,9 +15,11 @@ php: - "7.0" - "5.6" - "5.5" - - hhvm + - hhvm-3.3 + - hhvm-3.12 + - hhvm-3.18 -sudo: false +sudo: required env: matrix: @@ -45,6 +49,7 @@ after_script: - if [ -f vendor/bin/coveralls ] ; then php vendor/bin/coveralls -v || true ; fi - if [ -f vendor/bin/codacycoverage ] ; then php vendor/bin/codacycoverage clover || true ; fi - if [ -f php.log ] ; then cat php.log ; fi + - if [ -f build/logs/phpunit.json ] ; then ./scripts/phpunit-top-tests build/logs/phpunit.json ; fi after_success: - bash <(curl -s https://codecov.io/bash) @@ -81,9 +86,9 @@ cache: - $HOME/runkit # Install APT packages # - git > 2.5.1 needed for worktrees +# - mysql server does not seem to be always present on Travis Trusty environment addons: apt: packages: - git - sources: - - git-core + - mysql-server-5.6 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 959ac0e46d..770a082575 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -35,6 +35,7 @@ + diff --git a/phpunit.xml.hhvm b/phpunit.xml.hhvm index 7ae089b830..956a0d5e0a 100644 --- a/phpunit.xml.hhvm +++ b/phpunit.xml.hhvm @@ -26,5 +26,6 @@ + diff --git a/phpunit.xml.nocoverage b/phpunit.xml.nocoverage index 1683df5b69..cbec556ed1 100644 --- a/phpunit.xml.nocoverage +++ b/phpunit.xml.nocoverage @@ -36,5 +36,6 @@ + diff --git a/scripts/phpunit-top-tests b/scripts/phpunit-top-tests new file mode 100755 index 0000000000..975fc11c6c --- /dev/null +++ b/scripts/phpunit-top-tests @@ -0,0 +1,26 @@ +#!/usr/bin/env python +""" +Prints 10 longest lasting tests from JSON PHPUnit log +""" + +from __future__ import print_function + +import json +import sys + +def main(filename): + with open(filename) as handle: + content = handle.read() + data = json.loads( + '[' + content.replace('}{', '},{') + ']' + ) + printed = ['test', 'status', 'time'] + tests = [item for item in data if item['event'] == 'test'] + for test in sorted(tests, key=lambda item: -item['time'])[:10]: + for item in printed: + print('{0:10s}: {1}'.format(item, test[item])) + print() + + +if __name__ == '__main__': + main(*sys.argv[1:]) diff --git a/test/classes/properties/options/OptionsPropertyItemTest.php b/test/classes/properties/options/OptionsPropertyItemTest.php index 9811d8d644..8ed3c26d6a 100644 --- a/test/classes/properties/options/OptionsPropertyItemTest.php +++ b/test/classes/properties/options/OptionsPropertyItemTest.php @@ -93,12 +93,6 @@ class OptionsPropertyItemTest extends PHPUnit_Framework_TestCase */ public function testGetPropertyType() { - if ((defined('HHVM_VERSION') - && (version_compare(constant('HHVM_VERSION'), '3.8', 'lt'))) - ) { - $this->markTestSkipped('Due to a bug in early versions of HHVM, this test cannot be completed.'); - } - $this->assertEquals( 'options', $this->stub->getPropertyType() diff --git a/test/classes/properties/plugins/PluginPropertyItemTest.php b/test/classes/properties/plugins/PluginPropertyItemTest.php index 4e578b64c5..8668822b65 100644 --- a/test/classes/properties/plugins/PluginPropertyItemTest.php +++ b/test/classes/properties/plugins/PluginPropertyItemTest.php @@ -42,12 +42,6 @@ class PluginPropertyItemTest extends PHPUnit_Framework_TestCase */ public function testGetPropertyType() { - if ((defined('HHVM_VERSION') - && (version_compare(constant('HHVM_VERSION'), '3.8', 'lt'))) - ) { - $this->markTestSkipped('Due to a bug in early versions of HHVM, this test cannot be completed.'); - } - $this->assertEquals( "plugin", $this->stub->getPropertyType()