diff options
author | Nigel Babu <nigelb@redhat.com> | 2016-09-13 12:01:59 +0530 |
---|---|---|
committer | Nigel Babu <nigelb@redhat.com> | 2016-09-13 12:01:59 +0530 |
commit | f2dc0cbcb6bf83893c2b49894c10f3f197a2d7dd (patch) | |
tree | b9c64e493d99b4a4f52a787840fbcaae6cb1d8c3 /build-gluster-org/scripts/centos-regression.sh | |
parent | 477334a69cc90f4d7b1bcb5b4aa747b1aba2fca8 (diff) |
Merge the changes to regression skip logic
Change-Id: Ia9aebc97fc92f057b33025d9a56db52032007af6
Diffstat (limited to 'build-gluster-org/scripts/centos-regression.sh')
-rwxr-xr-x | build-gluster-org/scripts/centos-regression.sh | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/build-gluster-org/scripts/centos-regression.sh b/build-gluster-org/scripts/centos-regression.sh index 146a6ce..5280de6 100755 --- a/build-gluster-org/scripts/centos-regression.sh +++ b/build-gluster-org/scripts/centos-regression.sh @@ -36,38 +36,18 @@ sudo mkdir -p $JDIRS sudo chown jenkins:jenkins $JDIRS chmod 755 $JDIRS - -# Do not run tests that only modifies doc; does not consider chained changes or files in repo root -DOC_ONLY=true -for file in `git diff-tree --no-commit-id --name-only -r HEAD`; do - if [[ $file != doc/* ]]; then - DOC_ONLY=false - break - fi -done -if [[ "$DOC_ONLY" == true ]]; then - echo "Patch only modifies doc/*. Skipping further tests" - RET=0 - VERDICT="Skipped tests for doc only change" - V="+1" - ssh build@review.gluster.org gerrit review --message "'$BURL : $VERDICT'" --project=glusterfs --label CentOS-regression=$V $GIT_COMMIT - exit $RET -fi - - -# Skip tests for patches that make distaf only changes -# Do not run tests that only modifies distaf; does not consider chained changes or files in repo root -DISTAF_ONLY=true +# Skip tests for certain folders +SKIP=true for file in `git diff-tree --no-commit-id --name-only -r HEAD`; do - if [[ $file != tests/distaf/* ]]; then - DISTAF_ONLY=false + if [[ $file != doc/* ]] && [[ $file != build-aux/* ]] && [[ $file != tests/distaf/* ]]; then + SKIP=false break fi done -if [[ "$DISTAF_ONLY" == true ]]; then - echo "Patch only modifies tests/distaf/*. Skipping further tests" +if [[ "$SKIP" == true ]]; then + echo "Patch only modifies doc/*, build-aux/* or tests/distaf/*. Skipping further tests" RET=0 - VERDICT="Skipped tests for distaf only change" + VERDICT="Skipped tests for doc/*, build-aux/* or tests/distaf/* only change" V="+1" ssh build@review.gluster.org gerrit review --message "'$BURL : $VERDICT'" --project=glusterfs --label CentOS-regression=$V $GIT_COMMIT exit $RET |