Merge pull request #13041 from nijel/hhvm
Test against multiple HHVM versions
This commit is contained in:
commit
f3b44765ec
13
.travis.yml
13
.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
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
<logging>
|
||||
<log type="coverage-clover" target="build/logs/clover.xml"/>
|
||||
<log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
|
||||
<log type="json" target="build/logs/phpunit.json" />
|
||||
</logging>
|
||||
|
||||
<filter>
|
||||
|
||||
@ -26,5 +26,6 @@
|
||||
|
||||
<logging>
|
||||
<log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
|
||||
<log type="json" target="build/logs/phpunit.json" />
|
||||
</logging>
|
||||
</phpunit>
|
||||
|
||||
@ -36,5 +36,6 @@
|
||||
|
||||
<logging>
|
||||
<log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
|
||||
<log type="json" target="build/logs/phpunit.json" />
|
||||
</logging>
|
||||
</phpunit>
|
||||
|
||||
26
scripts/phpunit-top-tests
Executable file
26
scripts/phpunit-top-tests
Executable file
@ -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:])
|
||||
@ -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()
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user