From f2dc0cbcb6bf83893c2b49894c10f3f197a2d7dd Mon Sep 17 00:00:00 2001 From: Nigel Babu Date: Tue, 13 Sep 2016 12:01:59 +0530 Subject: Merge the changes to regression skip logic Change-Id: Ia9aebc97fc92f057b33025d9a56db52032007af6 --- build-gluster-org/scripts/netbsd7-regression.sh | 32 ++++++------------------- 1 file changed, 7 insertions(+), 25 deletions(-) (limited to 'build-gluster-org/scripts/netbsd7-regression.sh') diff --git a/build-gluster-org/scripts/netbsd7-regression.sh b/build-gluster-org/scripts/netbsd7-regression.sh index 185ad63..2626086 100755 --- a/build-gluster-org/scripts/netbsd7-regression.sh +++ b/build-gluster-org/scripts/netbsd7-regression.sh @@ -1,5 +1,4 @@ #!/bin/bash - MY_ENV=`env | sort` BURL=${BUILD_URL}consoleFull @@ -47,35 +46,18 @@ su -l root -c "rm -f /var/run/glusterd.socket" # Remove GlusterFS log files from previous runs su -l root -c "rm -rf /var/log/glusterfs/* /var/log/glusterfs/.cmd_log_history" -# 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 nb7build@review.gluster.org gerrit review --message "'$BURL : $VERDICT'" --project=glusterfs --code-review=0 --label NetBSD-regression=$V $GIT_COMMIT - exit $RET -fi - -# 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 nb7build@review.gluster.org gerrit review --message "'$BURL : $VERDICT'" --project=glusterfs --code-review=0 --label NetBSD-regression=$V $GIT_COMMIT exit $RET -- cgit