summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNigel Babu <nigelb@redhat.com>2018-03-27 19:38:44 +0530
committerNigel Babu <nigelb@redhat.com>2018-04-16 14:34:05 +0530
commitfc86b804a1aa4b7d7f28c64e42bf1a4f9c12502d (patch)
tree5cfda8cbcb351c74e78e3debfd0380b2afe4dd89
parent52f67924df1c74c4e3e678c459df23b9b8e9a020 (diff)
Add concurrency, commit message and module checks
Change-Id: I65a1006f734314cc1933af0985500a7af21c0f98
-rw-r--r--build-gluster-org/jobs/glusto-tests-lint.yml1
-rw-r--r--build-gluster-org/scripts/glusto-lint.sh16
2 files changed, 17 insertions, 0 deletions
diff --git a/build-gluster-org/jobs/glusto-tests-lint.yml b/build-gluster-org/jobs/glusto-tests-lint.yml
index 2747870..29e7b56 100644
--- a/build-gluster-org/jobs/glusto-tests-lint.yml
+++ b/build-gluster-org/jobs/glusto-tests-lint.yml
@@ -3,6 +3,7 @@
node: smoke7
description: Pre-commit tests for glusto-tests
project-type: freestyle
+ concurrent: true
scm:
- git:
diff --git a/build-gluster-org/scripts/glusto-lint.sh b/build-gluster-org/scripts/glusto-lint.sh
index db9f933..298c5a7 100644
--- a/build-gluster-org/scripts/glusto-lint.sh
+++ b/build-gluster-org/scripts/glusto-lint.sh
@@ -4,3 +4,19 @@ source /opt/rh/python27/enable
virtualenv --system-site-packages env
env/bin/pip install tox
env/bin/tox
+
+# Commit message standard
+if ! git show --pretty=format:%B | head -n 2 | tail -n 1 | egrep '^$' >/dev/null 2>&1 ; then
+ echo "Bad commit message format! Please add an empty line after the subject line. Do not break subject line with new-lines."
+ exit 1
+fi
+
+# verify that every folder has an __init__.py file
+set +e
+FOLDERLIST=$(find tests/functional -type d -print0 | xargs -0 -I {} ls {}/__init__.py)
+RET=$?
+set -e
+if [ $RET -ne 0 ]; then
+ echo "One of the folders in this change does not have an __init__.py file"
+ exit 1
+fi