From 55f1949776a56140b3fb8247a5d680bb29359308 Mon Sep 17 00:00:00 2001 From: Nigel Babu Date: Mon, 3 Sep 2018 12:24:23 +0530 Subject: Add a python-ast check as well Change-Id: I1ac7d514b4e4022845329d423cab60f2200dc546 --- build-gluster-org/jobs/python-compliance.yml | 22 ++++++++++++++++++++++ build-gluster-org/scripts/python-compliance.sh | 5 ++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/build-gluster-org/jobs/python-compliance.yml b/build-gluster-org/jobs/python-compliance.yml index 5b20bf2..9cf030f 100644 --- a/build-gluster-org/jobs/python-compliance.yml +++ b/build-gluster-org/jobs/python-compliance.yml @@ -8,6 +8,28 @@ scm: - glusterfs + triggers: + - gerrit: + trigger-on: + - patchset-created-event: + exclude-drafts: false + exclude-trivial-rebase: false + exclude-no-code-change: false + - draft-published-event + - comment-added-contains-event: + comment-contains-value: "recheck smoke" + server-name: review.gluster.org_for-smoke-jobs + skip-vote: + failed: true + unstable: true + notbuilt: true + projects: + - project-compare-type: 'PLAIN' + project-pattern: 'glusterfs' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**' + properties: - discard-after-x: x: 10 diff --git a/build-gluster-org/scripts/python-compliance.sh b/build-gluster-org/scripts/python-compliance.sh index 532170c..875ba67 100644 --- a/build-gluster-org/scripts/python-compliance.sh +++ b/build-gluster-org/scripts/python-compliance.sh @@ -1,4 +1,7 @@ #!/usr/bin/bash +./autogen.sh +./configure --disable-bd-xlator --enable-debug --enable-gnfs --silent grep -rnl '#!/usr/bin/python' | xargs pylint-3 --py3k find . -name '*.py' | xargs pylint-3 --py3k -find . -name '*.in' | xargs file | grep 'Python' | awk '{print $1}' | cut -d: -f 1 | xargs pylint-3 --py3k +find . -name '*.py' | xargs python2 /opt/qa/python_compliance.py +find . -name '*.py' | xargs python3 /opt/qa/python_compliance.py -- cgit