2014-03-03 02:10:01 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2014-03-03 01:43:58 +01:00
|
|
|
export PHPSECLIB_SSH_HOSTNAME='localhost'
|
|
|
|
export PHPSECLIB_SSH_USERNAME='phpseclib'
|
|
|
|
export PHPSECLIB_SSH_PASSWORD='EePoov8po1aethu2kied1ne0'
|
2014-04-02 16:23:22 +02:00
|
|
|
export PHPSECLIB_SSH_HOME='/home/phpseclib'
|
2014-03-03 01:43:58 +01:00
|
|
|
|
2014-04-12 04:09:18 +02:00
|
|
|
if [ "$TRAVIS_PHP_VERSION" = '5.2' ]
|
|
|
|
then
|
|
|
|
PHPUNIT="phpunit"
|
|
|
|
else
|
|
|
|
PHPUNIT="$(dirname "$0")/../vendor/bin/phpunit"
|
|
|
|
fi
|
|
|
|
|
2014-04-10 20:00:48 +02:00
|
|
|
PHPUNIT_EXTRA_ARGS=''
|
2014-04-12 07:13:44 +02:00
|
|
|
if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.4', '<');"` = "1" ]
|
2014-04-10 20:00:48 +02:00
|
|
|
then
|
|
|
|
PHPUNIT_EXTRA_ARGS="$PHPUNIT_EXTRA_ARGS -d zend.enable_gc=0"
|
|
|
|
fi
|
|
|
|
|
2014-04-12 04:09:18 +02:00
|
|
|
"$PHPUNIT" \
|
2014-04-10 20:00:48 +02:00
|
|
|
$PHPUNIT_EXTRA_ARGS \
|
2014-03-03 02:10:01 +01:00
|
|
|
--verbose \
|
|
|
|
--coverage-text \
|
2014-06-01 13:12:42 +02:00
|
|
|
--coverage-clover code_coverage/clover.xml \
|
2014-03-03 02:10:01 +01:00
|
|
|
--coverage-html code_coverage/
|