test: add debug print
This commit is contained in:
parent
0fe3083cd7
commit
cd92f73ca1
|
@ -1,11 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -x -e -u
|
set -x -e -u
|
||||||
|
export DEBUG=1
|
||||||
export CODE_PATH=${CODE_PATH:-"/emqx"}
|
export CODE_PATH=${CODE_PATH:-"/emqx"}
|
||||||
export EMQX_NAME=${EMQX_NAME:-"emqx"}
|
export EMQX_NAME=${EMQX_NAME:-"emqx"}
|
||||||
export PACKAGE_PATH="${CODE_PATH}/_packages/${EMQX_NAME}"
|
export PACKAGE_PATH="${CODE_PATH}/_packages/${EMQX_NAME}"
|
||||||
export RELUP_PACKAGE_PATH="${CODE_PATH}/_upgrade_base"
|
export RELUP_PACKAGE_PATH="${CODE_PATH}/_upgrade_base"
|
||||||
# export EMQX_NODE_NAME="emqx-on-$(uname -m)@127.0.0.1"
|
|
||||||
# export EMQX_NODE_COOKIE=$(date +%s%N)
|
|
||||||
|
|
||||||
case "$(uname -m)" in
|
case "$(uname -m)" in
|
||||||
x86_64)
|
x86_64)
|
||||||
|
@ -122,6 +121,9 @@ run_test(){
|
||||||
tee -a "$emqx_env_vars" <<EOF
|
tee -a "$emqx_env_vars" <<EOF
|
||||||
export EMQX_ZONE__EXTERNAL__SERVER_KEEPALIVE=60
|
export EMQX_ZONE__EXTERNAL__SERVER_KEEPALIVE=60
|
||||||
export EMQX_MQTT__MAX_TOPIC_ALIAS=10
|
export EMQX_MQTT__MAX_TOPIC_ALIAS=10
|
||||||
|
export EMQX_LOG__CONSOLE_HANDLER__LEVEL=debug
|
||||||
|
export EMQX_LOG__FILE_HANDLERS__EMQX_LOG__LEVEL=debug
|
||||||
|
export EMQX_LOG__PRIMARY_LEVEL=debug
|
||||||
EOF
|
EOF
|
||||||
## for ARM, due to CI env issue, skip start of quic listener for the moment
|
## for ARM, due to CI env issue, skip start of quic listener for the moment
|
||||||
[[ $(arch) == *arm* || $(arch) == aarch64 ]] && tee -a "$emqx_env_vars" <<EOF
|
[[ $(arch) == *arm* || $(arch) == aarch64 ]] && tee -a "$emqx_env_vars" <<EOF
|
||||||
|
@ -151,6 +153,8 @@ EOF
|
||||||
# shellcheck disable=SC2009 # pgrep does not support Extended Regular Expressions
|
# shellcheck disable=SC2009 # pgrep does not support Extended Regular Expressions
|
||||||
ps -ef | grep -E '\-progname\s.+emqx\s'
|
ps -ef | grep -E '\-progname\s.+emqx\s'
|
||||||
if ! emqx 'stop'; then
|
if ! emqx 'stop'; then
|
||||||
|
# shellcheck disable=SC2009 # pgrep does not support Extended Regular Expressions
|
||||||
|
ps -ef | grep -E '\-progname\s.+emqx\s'
|
||||||
echo "ERROR: failed_to_stop_emqx_with_the_stop_command"
|
echo "ERROR: failed_to_stop_emqx_with_the_stop_command"
|
||||||
cat /var/log/emqx/erlang.log.1 || true
|
cat /var/log/emqx/erlang.log.1 || true
|
||||||
cat /var/log/emqx/emqx.log.1 || true
|
cat /var/log/emqx/emqx.log.1 || true
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
erlang 24.0.1-emqx-1
|
erlang 24.0.5-emqx-1
|
||||||
|
|
2
bin/emqx
2
bin/emqx
|
@ -489,7 +489,7 @@ case "$1" in
|
||||||
# also log to syslog
|
# also log to syslog
|
||||||
logger -t "${REL_NAME}[${PID}]" "STOP: $msg"
|
logger -t "${REL_NAME}[${PID}]" "STOP: $msg"
|
||||||
# log to user console
|
# log to user console
|
||||||
echoerr "STOP: $msg"
|
echoerr "stop failed, $msg"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
logger -t "${REL_NAME}[${PID}]" "STOP: OK"
|
logger -t "${REL_NAME}[${PID}]" "STOP: OK"
|
||||||
|
|
Loading…
Reference in New Issue