You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2021/11/02 13:49:50 UTC

[apisix] branch master updated: test: show error.log once the CLI test failed (#5405)

This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new a0efeca  test: show error.log once the CLI test failed (#5405)
a0efeca is described below

commit a0efeca194bcca58e62d73c0a19464f480a1b7c9
Author: 罗泽轩 <sp...@gmail.com>
AuthorDate: Tue Nov 2 21:49:41 2021 +0800

    test: show error.log once the CLI test failed (#5405)
---
 .github/workflows/fuzzing-ci.yaml          | 1 +
 ci/centos7-ci.sh                           | 2 +-
 ci/common.sh                               | 1 +
 ci/linux_apisix_current_luarocks_runner.sh | 2 ++
 ci/linux_apisix_master_luarocks_runner.sh  | 2 ++
 t/cli/common.sh                            | 7 +++++++
 6 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/fuzzing-ci.yaml b/.github/workflows/fuzzing-ci.yaml
index 00edfd0..ec9dfa8 100644
--- a/.github/workflows/fuzzing-ci.yaml
+++ b/.github/workflows/fuzzing-ci.yaml
@@ -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
diff --git a/ci/centos7-ci.sh b/ci/centos7-ci.sh
index 29c7c36..f5a1799 100755
--- a/ci/centos7-ci.sh
+++ b/ci/centos7-ci.sh
@@ -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() {
diff --git a/ci/common.sh b/ci/common.sh
index 0aae070..f27583b 100644
--- a/ci/common.sh
+++ b/ci/common.sh
@@ -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)
diff --git a/ci/linux_apisix_current_luarocks_runner.sh b/ci/linux_apisix_current_luarocks_runner.sh
index a143d47..2682a4f 100755
--- a/ci/linux_apisix_current_luarocks_runner.sh
+++ b/ci/linux_apisix_current_luarocks_runner.sh
@@ -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)
diff --git a/ci/linux_apisix_master_luarocks_runner.sh b/ci/linux_apisix_master_luarocks_runner.sh
index a75fdf6..ed3e58c 100755
--- a/ci/linux_apisix_master_luarocks_runner.sh
+++ b/ci/linux_apisix_master_luarocks_runner.sh
@@ -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
diff --git a/t/cli/common.sh b/t/cli/common.sh
index 521d41d..9da89a0 100644
--- a/t/cli/common.sh
+++ b/t/cli/common.sh
@@ -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
 }