This is an automated email from the ASF dual-hosted git repository. wwbmmm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push: new 72303471 Fix incorrect core file found in run_tests.sh (#2614) 72303471 is described below commit 723034713e2aa544dfb7e2fa3d65987d11ddf802 Author: Bright Chen <chenguangmin...@foxmail.com> AuthorDate: Mon Apr 29 10:08:57 2024 +0800 Fix incorrect core file found in run_tests.sh (#2614) --- test/run_tests.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/run_tests.sh b/test/run_tests.sh index fbf9ee87..ebd64840 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -15,11 +15,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +# turn on coredumps +ulimit -c unlimited +rm core.* + 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" @@ -34,6 +37,7 @@ if [ $test_num -eq 0 ]; then >&2 echo "[runtest] Cannot find any tests" exit 1 fi + print_bt () { # 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) @@ -42,6 +46,7 @@ print_bt () { gdb -c "$COREFILE" $1 -ex "thread apply all bt" -ex "set pagination 0" -batch; fi } + if [ -z "$failed_test" ]; then >&2 echo "[runtest] $test_num succeeded" elif [ $test_num -gt 1 ]; then --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org