projects
/
lttng-ci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
jjb: fix liburcu build prior to 0.11
[lttng-ci.git]
/
scripts
/
babeltrace
/
pylint.sh
diff --git
a/scripts/babeltrace/pylint.sh
b/scripts/babeltrace/pylint.sh
old mode 100644
(file)
new mode 100755
(executable)
index
5ed53e9
..
35b287f
--- a/
scripts/babeltrace/pylint.sh
+++ b/
scripts/babeltrace/pylint.sh
@@
-1,6
+1,7
@@
#!/bin/sh -exu
#
#!/bin/sh -exu
#
-# Copyright (C) 2015 - Michael Jeanson <mjeanson@efficios.com>
+# Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
+# Copyright (C) 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@
-15,22
+16,30
@@
# 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/>.
-BABELTRACE_DIR="deps/babeltrace/build"
-BINDINGS_DIR="$BABELTRACE_DIR/lib/python3.4/dist-packages/babeltrace"
+PYTHON3=python3
PYENV_HOME="$WORKSPACE/.pyenv/"
# Delete previously built virtualenv
PYENV_HOME="$WORKSPACE/.pyenv/"
# Delete previously built virtualenv
-if [ -d
$PYENV_HOME
]; then
- rm -rf
$PYENV_HOME
+if [ -d
"$PYENV_HOME"
]; then
+ rm -rf
"$PYENV_HOME"
fi
# Create virtualenv and install necessary packages
fi
# Create virtualenv and install necessary packages
-virtualenv --system-site-packages -p python3 $PYENV_HOME
-. $PYENV_HOME/bin/activate
-pip install --quiet pylint
-pip install --quiet pep8
+virtualenv --system-site-packages -p ${PYTHON3} "$PYENV_HOME"
-pep8 --exclude="nativebt.py" $BINDINGS_DIR | tee pep8.out
+set +ux
+. "$PYENV_HOME/bin/activate"
+set -ux
-pylint -f parseable --ignore="nativebt.py" $BINDINGS_DIR | tee pylint.out
+pip install --quiet black
+pip install --quiet flake8
+
+exit_code=0
+
+cd src/babeltrace
+
+black --diff --check . | tee ../../black.out || exit_code=1
+flake8 | tee ../../flake8.out || exit_code=1
+
+exit $exit_code
This page took
0.025104 seconds
and
4
git commands to generate.