test: show error.log once the CLI test failed (#5405)

This commit is contained in:
罗泽轩 2021-11-02 21:49:41 +08:00 committed by GitHub
parent 7b06fcc468
commit a0efeca194
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 1 deletions

View File

@ -52,6 +52,7 @@ jobs:
sudo apt-get install -y git openresty curl openresty-openssl111-dev unzip make gcc libldap2-dev
./utils/linux-install-luarocks.sh
git config --global url.https://github.com/.insteadOf git://github.com/
make deps
make init
make run

View File

@ -74,7 +74,7 @@ install_dependencies() {
# install dependencies
git clone https://github.com/iresty/test-nginx.git test-nginx
make deps
create_lua_deps
}
run_case() {

View File

@ -26,6 +26,7 @@ export_or_prefix() {
create_lua_deps() {
echo "Create lua deps"
git config --global url.https://github.com/.insteadOf git://github.com/
make deps
# maybe reopen this feature later
# luarocks install luacov-coveralls --tree=deps --local > build.log 2>&1 || (cat build.log && exit 1)

View File

@ -32,6 +32,8 @@ script() {
sudo rm -rf /usr/local/apisix
git config --global url.https://github.com/.insteadOf git://github.com/
# install APISIX with local version
sudo luarocks install rockspec/apisix-master-0.rockspec --only-deps > build.log 2>&1 || (cat build.log && exit 1)
sudo luarocks make rockspec/apisix-master-0.rockspec > build.log 2>&1 || (cat build.log && exit 1)

View File

@ -36,6 +36,8 @@ script() {
mkdir tmp && cd tmp
cp -r ../utils ./
git config --global url.https://github.com/.insteadOf git://github.com/
# install APISIX by luarocks
sudo luarocks install $APISIX_MAIN > build.log 2>&1 || (cat build.log && exit 1)
cp ../bin/apisix /usr/local/bin/apisix

View File

@ -21,7 +21,14 @@
set -ex
check_failure() {
cat logs/error.log
}
clean_up() {
if [ $? -gt 0 ]; then
check_failure
fi
make stop || true
git checkout conf/config.yaml
}