diff options
| author | Jeff Darcy <jdarcy@redhat.com> | 2016-03-11 16:20:01 -0500 | 
|---|---|---|
| committer | Raghavendra Talur <rtalur@redhat.com> | 2016-05-06 03:17:07 -0700 | 
| commit | 1779bd895066750da95054b45175bf68752878b7 (patch) | |
| tree | 18b36a7d9ffec2719055d0d5aa05bba08ea14bbb /run-tests.sh | |
| parent | d544ac4997d047b0a27e40d445e910373b3acfd2 (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.
>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>
Change-Id: Ied2d552d227b55027211c07db6ee5dc20979596b
BUG: 1316533
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/14232
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>
Diffstat (limited to 'run-tests.sh')
| -rwxr-xr-x | run-tests.sh | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/run-tests.sh b/run-tests.sh index f080267b4ef..082b0d2e6c3 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  | 
