You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by ja...@apache.org on 2019/05/30 06:11:39 UTC
[incubator-brpc] branch master updated: Fix run_tests.sh
This is an automated email from the ASF dual-hosted git repository.
jamesge pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git
The following commit(s) were added to refs/heads/master by this push:
new 72f3f4d Fix run_tests.sh
new 71e2648 Merge branch 'master' of https://github.com/brpc/brpc
72f3f4d is described below
commit 72f3f4de3469567d9571892bceef725cfd19ed68
Author: gejun <ge...@bilibili.com>
AuthorDate: Thu May 30 14:09:08 2019 +0800
Fix run_tests.sh
---
test/run_tests.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/run_tests.sh b/test/run_tests.sh
index be1f436..8d84856 100755
--- a/test/run_tests.sh
+++ b/test/run_tests.sh
@@ -3,6 +3,7 @@ test_num=0
failed_test=""
rc=0
test_bins="test_butil test_bvar bthread*unittest brpc*unittest"
+ulimit -c unlimited # turn on coredumps
for test_bin in $test_bins; do
test_num=$((test_num + 1))
>&2 echo "[runtest] $test_bin"
@@ -18,8 +19,9 @@ if [ $test_num -eq 0 ]; then
exit 1
fi
print_bt () {
- COREFILE=$(find . -maxdepth 2 -name "core*" | head -n 1) # find core file
- if [[ -f "$COREFILE" ]]; then
+ # find newest core file
+ COREFILE=$(find . -name "core*" -type f -printf "%T@ %p\n" | sort -k 1 -n | cut -d' ' -f 2- | tail -n 1)
+ if [ ! -z "$COREFILE" ]; then
gdb -c "$COREFILE" $1 -ex "thread apply all bt" -ex "set pagination 0" -batch;
fi
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org