summaryrefslogtreecommitdiffstats
path: root/git/pylint.sh
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2016-12-21 17:15:42 -0500
committerJason DeTiberus <jdetiber@redhat.com>2017-01-10 11:45:30 -0500
commitbe949e0a0a2420205aaf80de514432a76596a854 (patch)
treebe5edc6198f976215c1521a490d788f46b29e227 /git/pylint.sh
parent9d316d3091b28820e3840c535fc9bc4b6603ed72 (diff)
downloadopenshift-be949e0a0a2420205aaf80de514432a76596a854.tar.gz
openshift-be949e0a0a2420205aaf80de514432a76596a854.tar.bz2
openshift-be949e0a0a2420205aaf80de514432a76596a854.tar.xz
openshift-be949e0a0a2420205aaf80de514432a76596a854.zip
More toxification
- Move pylint tests to tox - Move yamllint tests to tox - Create separate tox config (and setup.py) for root - bump ansible requirement - unify pylint config - add docs - remove git directory containing old testing tools - install python-six if not present for openshift-facts - add python-six as a dependency for openshift-ansible-utils
Diffstat (limited to 'git/pylint.sh')
-rwxr-xr-xgit/pylint.sh51
1 files changed, 0 insertions, 51 deletions
diff --git a/git/pylint.sh b/git/pylint.sh
deleted file mode 100755
index 3acf9cc8c..000000000
--- a/git/pylint.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env bash
-set -eu
-
-ANSIBLE_UPSTREAM_FILES=(
- 'inventory/aws/hosts/ec2.py'
- 'inventory/gce/hosts/gce.py'
- 'inventory/libvirt/hosts/libvirt_generic.py'
- 'inventory/openstack/hosts/nova.py'
- 'lookup_plugins/sequence.py'
- 'playbooks/gce/openshift-cluster/library/gce.py'
- )
-
-OLDREV=$1
-NEWREV=$2
-#TRG_BRANCH=$3
-
-PYTHON=$(which python)
-
-set +e
-PY_DIFF=$(/usr/bin/git diff --name-only $OLDREV $NEWREV --diff-filter=ACM | grep ".py$")
-set -e
-
-FILES_TO_TEST=""
-
-for PY_FILE in $PY_DIFF; do
- IGNORE_FILE=false
- for UPSTREAM_FILE in "${ANSIBLE_UPSTREAM_FILES[@]}"; do
- if [ "${PY_FILE}" == "${UPSTREAM_FILE}" ]; then
- IGNORE_FILE=true
- break
- fi
- done
-
- if [ "${IGNORE_FILE}" == true ]; then
- echo "Skipping file ${PY_FILE} as an upstream Ansible file..."
- continue
- fi
-
- if [ -e "${PY_FILE}" ]; then
- FILES_TO_TEST="${FILES_TO_TEST} ${PY_FILE}"
- fi
-done
-
-export PYTHONPATH=${WORKSPACE}/utils/src/:${WORKSPACE}/utils/test/
-
-if [ "${FILES_TO_TEST}" != "" ]; then
- echo "Testing files: ${FILES_TO_TEST}"
- exec ${PYTHON} -m pylint --rcfile ${WORKSPACE}/git/.pylintrc ${FILES_TO_TEST}
-else
- exit 0
-fi