update travis runner script (#227)

This commit is contained in:
周晶 2019-07-10 22:23:27 +08:00 committed by WenMing
parent 374aba472b
commit 947a3f5436
3 changed files with 7 additions and 11 deletions

View File

@ -37,13 +37,13 @@ before_cache:
- brew cleanup
before_install:
- ./utils/travis_runner_$TRAVIS_OS_NAME.sh before_install
- $PWD/.travis/${TRAVIS_OS_NAME}_runner.sh before_install
install:
- ./utils/travis_runner_$TRAVIS_OS_NAME.sh do_install
- $PWD/.travis/${TRAVIS_OS_NAME}_runner.sh do_install
script:
- ./utils/travis_runner_$TRAVIS_OS_NAME.sh script
- $PWD/.travis/${TRAVIS_OS_NAME}_runner.sh script
after_success:
- ./utils/travis_runner_$TRAVIS_OS_NAME.sh after_success
- $PWD/.travis/${TRAVIS_OS_NAME}_runner.sh after_success

View File

@ -7,7 +7,7 @@
# travis_runner_linux ./travis_runner_linux.sh
#
# Environment variables that control this script:
#
# OPENRESTY_PREFIX
### END ###
set -ex

View File

@ -13,16 +13,14 @@
set -ex
export_or_prefix() {
export OPENRESTY_PREFIX=$(TMP='./v_tmp' && $(which openresty) -V &>${TMP} &&
cat ${TMP} | grep prefix | grep -Eo 'prefix=(.*?)/nginx' |
grep -Eo '/.*/' && rm ${TMP})
export OPENRESTY_PREFIX=$(brew --prefix openresty/brew/openresty-debug)
}
before_install() {
HOMEBREW_NO_AUTO_UPDATE=1 brew install perl cpanminus etcd luarocks openresty/brew/openresty-debug tree
sudo cpanm --notest Test::Nginx IPC::Run >build.log 2>&1 || (cat build.log && exit 1)
export_or_prefix
luarocks install --lua-dir=${OPENRESTY_PREFIX}luajit luacov-coveralls --local --tree=deps
luarocks install --lua-dir=${OPENRESTY_PREFIX}/luajit luacov-coveralls --local --tree=deps
}
do_install() {
@ -56,8 +54,6 @@ script() {
sudo touch /usr/local/var/log/nginx/error.log
sudo chmod 777 /usr/local/var/log/nginx/error.log
APISIX_ENABLE_LUACOV=1 prove -Itest-nginx/lib -I./ -r t
# cat $PWD/t/servroot/conf/nginx.conf
# cat /usr/local/var/log/nginx/error.log
}
after_success() {