projects
/
lttng-ci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
jjb: remove sid-powerpc from portbuild jobs
[lttng-ci.git]
/
scripts
/
babeltrace
/
pylint.sh
diff --git
a/scripts/babeltrace/pylint.sh
b/scripts/babeltrace/pylint.sh
index f04f8ad870856e826cf6ba49fee91b5797989977..839d86266da2edfe4c686ac06e0967b9e4d02270 100755
(executable)
--- a/
scripts/babeltrace/pylint.sh
+++ b/
scripts/babeltrace/pylint.sh
@@
-1,4
+1,4
@@
-#!/bin/bash
-exu
+#!/bin/bash
#
# Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
# Copyright (C) 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
#
# Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
# Copyright (C) 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
@@
-16,10
+16,13
@@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+set -exu
+
set -o pipefail
PYTHON3=python3
set -o pipefail
PYTHON3=python3
+SRCDIR="$WORKSPACE/src/babeltrace"
PYENV_HOME="$WORKSPACE/.pyenv/"
# Delete previously built virtualenv
PYENV_HOME="$WORKSPACE/.pyenv/"
# Delete previously built virtualenv
@@
-31,15
+34,20
@@
fi
virtualenv --system-site-packages -p ${PYTHON3} "$PYENV_HOME"
set +ux
virtualenv --system-site-packages -p ${PYTHON3} "$PYENV_HOME"
set +ux
+# shellcheck disable=SC1090
. "$PYENV_HOME/bin/activate"
set -ux
. "$PYENV_HOME/bin/activate"
set -ux
-pip install --quiet black
-pip install --quiet flake8
+if [ -f "$SRCDIR/dev-requirements.txt" ]; then
+ pip install -r "$SRCDIR/dev-requirements.txt"
+else
+ pip install --quiet black
+ pip install --quiet flake8
+fi
exit_code=0
exit_code=0
-cd
src/babeltrace
+cd
"$SRCDIR"
black --diff --check . | tee ../../black.out || exit_code=1
flake8 --output-file=../../flake8.out --tee || exit_code=1
black --diff --check . | tee ../../black.out || exit_code=1
flake8 --output-file=../../flake8.out --tee || exit_code=1
This page took
0.023204 seconds
and
4
git commands to generate.