summaryrefslogtreecommitdiffstats
path: root/run-tests.sh
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2016-03-11 16:20:01 -0500
committerJeff Darcy <jdarcy@redhat.com>2016-03-12 04:59:37 -0800
commit68b840267ed0f6864e4cf5ba7d842988c0fb3da8 (patch)
tree4957b4a3bde3314650112654cd4b02cbb6383c68 /run-tests.sh
parent2807e3fc005630213ab7ad251fef13d61c07ac6b (diff)
tests: return correct value from run_head_tests when no tests are found
Also added a diff filter to avoid listing deleted tests. Thanks to Raghavendra Talur for the suggestion. Change-Id: Ied2d552d227b55027211c07db6ee5dc20979596b Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: https://review.gluster.org/13686 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> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'run-tests.sh')
-rwxr-xr-xrun-tests.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/run-tests.sh b/run-tests.sh
index 8fcfa71..db956cf 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -335,15 +335,15 @@ function run_tests()
function run_head_tests()
{
- [ -d ${regression_testsdir}/.git ] || return
+ [ -d ${regression_testsdir}/.git ] || return 0
# The git command needs $cwd to be within the repository, but run_tests
# needs it to be back where we started.
pushd $regression_testsdir
- git_cmd="git diff-tree --no-commit-id --name-only -r HEAD"
- htests=$($git_cmd tests | grep '.t$')
+ git_cmd="git diff-tree --no-commit-id --name-only --diff-filter=ACMRTUXB"
+ htests=$($git_cmd -r HEAD tests | grep '.t$')
popd
- [ -n "$htests" ] || return
+ [ -n "$htests" ] || return 0
# Perhaps it's not ideal that we'll end up re-running these tests, but the
# gains from letting them fail fast in the first round should outweigh the