From fc86b804a1aa4b7d7f28c64e42bf1a4f9c12502d Mon Sep 17 00:00:00 2001 From: Nigel Babu Date: Tue, 27 Mar 2018 19:38:44 +0530 Subject: Add concurrency, commit message and module checks Change-Id: I65a1006f734314cc1933af0985500a7af21c0f98 --- build-gluster-org/jobs/glusto-tests-lint.yml | 1 + build-gluster-org/scripts/glusto-lint.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'build-gluster-org') 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 -- cgit