summaryrefslogtreecommitdiffstats
path: root/build-gluster-org/scripts
diff options
context:
space:
mode:
authorNigel Babu <nigelb@redhat.com>2017-06-19 11:32:32 +0530
committerNigel Babu <nigelb@redhat.com>2017-06-19 12:37:59 +0530
commit43c8a51e863383ee30ce8bc8168fd689766d04c1 (patch)
tree96200cc8c9177f07df464a3ddf97e3f4855af5e3 /build-gluster-org/scripts
parent25822be4f12024d5e0012f98341617fdc9037818 (diff)
On master, only run tests/basic in regression
* Give experimental branch a free pass for Centos Regression * Run shellcheck on scripts to remove problematic warnings Change-Id: I939b4bb09bae4dd65efe1e80a43f69fee4bbf9ac
Diffstat (limited to 'build-gluster-org/scripts')
-rw-r--r--build-gluster-org/scripts/centos-regression.sh17
-rw-r--r--build-gluster-org/scripts/netbsd7-regression.sh11
2 files changed, 16 insertions, 12 deletions
diff --git a/build-gluster-org/scripts/centos-regression.sh b/build-gluster-org/scripts/centos-regression.sh
index 3056b79..d167b78 100644
--- a/build-gluster-org/scripts/centos-regression.sh
+++ b/build-gluster-org/scripts/centos-regression.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-MY_ENV=`env | sort`
+MY_ENV=$(env | sort)
BURL=${BUILD_URL}consoleFull
# Display all environment variables in the debugging log
@@ -12,8 +12,8 @@ echo
echo "$MY_ENV"
echo
-# FB gets a pass on regressions on their branch.
-if [ $GERRIT_BRANCH = "release-3.8-fb" ]; then
+# FB and experimental branch gets a pass
+if [ "$GERRIT_BRANCH" = "release-3.8-fb" ] || [ "$GERRIT_BRANCH" = 'experimental' ]; then
echo "Skipping regression run for ${GERRIT_BRANCH}"
RET=0
VERDICT="Skipped for ${GERRIT_BRANCH}"
@@ -28,7 +28,7 @@ sudo -E bash /opt/qa/cleanup.sh
# Clean up the git repo
sudo rm -rf $WORKSPACE/.gitignore $WORKSPACE/*
sudo chown -R jenkins:jenkins $WORKSPACE
-cd $WORKSPACE
+cd $WORKSPACE || exit 1
git reset --hard HEAD
# Clean up other Gluster dirs
@@ -47,7 +47,7 @@ chmod 755 $JDIRS
# Skip tests for certain folders
SKIP=true
-for file in `git diff-tree --no-commit-id --name-only -r HEAD`; do
+for file in $(git diff-tree --no-commit-id --name-only -r HEAD); do
if [[ $file != doc/* ]] && [[ $file != build-aux/* ]] && [[ $file != tests/distaf/* ]]; then
SKIP=false
break
@@ -85,7 +85,12 @@ echo
echo "Run the regression test"
echo "***********************"
echo
-sudo -E bash /opt/qa/regression.sh
+if [ "$GERRIT_BRANCH" = "master" ]; then
+ sudo -E bash /opt/qa/regression.sh tests/basic
+else
+ sudo -E bash /opt/qa/regression.sh
+fi
+
RET=$?
if [ $RET = 0 ]; then
V="+1"
diff --git a/build-gluster-org/scripts/netbsd7-regression.sh b/build-gluster-org/scripts/netbsd7-regression.sh
index 77acab7..83c8d7b 100644
--- a/build-gluster-org/scripts/netbsd7-regression.sh
+++ b/build-gluster-org/scripts/netbsd7-regression.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-MY_ENV=`env | sort`
+MY_ENV=$(env | sort)
BURL=${BUILD_URL}consoleFull
# Display all environment variables in the debugging log
@@ -15,7 +15,8 @@ echo
# Exit early with success if the change is on release-3.{5,6}
# NetBSD regression doesn't run successfully on release-3.{5,6}
# FB gets a pass on regressions on their branch.
-if [ $GERRIT_BRANCH = "release-3.5" -o $GERRIT_BRANCH = "release-3.6" -o $GERRIT_BRANCH = "release-3.8-fb" ]; then
+# Experimental also gets a pass
+if [ "$GERRIT_BRANCH" = "release-3.5" ] || [ "$GERRIT_BRANCH" = "release-3.6" ] || [ "$GERRIT_BRANCH" = "release-3.8-fb" ] || [ "$GERRIT_BRANCH" = "experimental" ]; then
echo "Skipping regression run for ${GERRIT_BRANCH}"
RET=0
VERDICT="Skipped for ${GERRIT_BRANCH}"
@@ -35,7 +36,7 @@ su -l root -c "chown -R jenkins /usr/pkg/lib/python2.7/site-packages/gluster"
# Clean up the git repo
su -l root -c "rm -rf $WORKSPACE/.gitignore $WORKSPACE/*"
su -l root -c "chown -R jenkins $WORKSPACE"
-cd $WORKSPACE
+cd $WORKSPACE || exit 1
git reset --hard HEAD
# Clean up other Gluster dirs
@@ -49,7 +50,7 @@ su -l root -c "rm -rf /var/log/glusterfs/* /var/log/glusterfs/.cmd_log_history"
# Skip tests for certain folders
SKIP=true
-for file in `git diff-tree --no-commit-id --name-only -r HEAD`; do
+for file in $(git diff-tree --no-commit-id --name-only -r HEAD); do
if [[ $file != doc/* ]] && [[ $file != build-aux/* ]] && [[ $file != tests/distaf/* ]]; then
SKIP=false
break
@@ -96,11 +97,9 @@ su -l root -c "cd $WORKSPACE && /opt/qa/regression.sh"
RET=$?
if [ $RET = 0 ]; then
V="+1"
- R="0"
VERDICT="SUCCESS"
else
V="-1"
- R="0"
VERDICT="FAILED"
fi