summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2016-04-14 08:49:35 -0400
committerJeff Darcy <jdarcy@redhat.com>2016-04-15 04:11:18 -0700
commit435e25d510ed74dd9b59b22dcb062daca088327f (patch)
tree7d0457070bffd7ca2c6b044fbf00327abaf83a97
parent2b7ae34eff4ed00f15661cf1ca5b2ee07a1d93bd (diff)
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 <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/14001 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
-rwxr-xr-xrun-tests.sh4
1 files 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"