From 435e25d510ed74dd9b59b22dcb062daca088327f Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Thu, 14 Apr 2016 08:49:35 -0400 Subject: tests: fix per-test core detection This is a backport of the following patch: http://review.gluster.org/13921 Commit 9933c5ab in glusterfs-patch-acceptance-tests broke the code here to count cores after each test, with two bad effects: * Tests continue to run after the job is already guaranteed to fail, tying up resources and delaying jobs for other patches. * Cores aren't detected until the end of the job, long after it might have been possible to figure out what was going on at the time the process died. The current check here works for the current code in the other repo, but could break if the two repos are changed without coordination again. Change-Id: I0840849f5df8b6a62893bad1b80b6ace208ffe90 Signed-off-by: Jeff Darcy Reviewed-on: http://review.gluster.org/14001 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Atin Mukherjee --- run-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run-tests.sh b/run-tests.sh index 73520894224..9abe0be1121 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -207,7 +207,7 @@ function run_tests() for t in $(find ${regression_testsdir}/tests -name '*.t' \ | LC_COLLATE=C sort) ; do - old_cores=$(ls /core.* 2> /dev/null | wc -l) + old_cores=$(ls /*-*.core 2> /dev/null | wc -l) if match $t "$@" ; then echo echo "==================================================" @@ -244,7 +244,7 @@ function run_tests() RES=${TMP_RES} FAILED="${FAILED}${t} " fi - new_cores=$(ls /core.* 2> /dev/null | wc -l) + new_cores=$(ls /*-*.core 2> /dev/null | wc -l) if [ x"$new_cores" != x"$old_cores" ]; then core_diff=$((new_cores-old_cores)) echo "$t: $core_diff new core files" -- cgit