summaryrefslogtreecommitdiffstats
path: root/ci/build-vsperf.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/build-vsperf.sh')
-rwxr-xr-xci/build-vsperf.sh30
1 files changed, 25 insertions, 5 deletions
diff --git a/ci/build-vsperf.sh b/ci/build-vsperf.sh
index cc9d2530..b4a0f24b 100755
--- a/ci/build-vsperf.sh
+++ b/ci/build-vsperf.sh
@@ -27,8 +27,9 @@
EXIT=0
EXIT_TC_FAILED=1
EXIT_SANITY_TC_FAILED=2
-EXIT_NO_RESULTS=10
-EXIT_NO_TEST_REPORT_LOG_DIR=11
+EXIT_PYLINT_FAILED=4
+EXIT_NO_RESULTS=128
+EXIT_NO_TEST_REPORT_LOG_DIR=256
#
# configuration
@@ -207,7 +208,7 @@ function execute_vsperf() {
exit $EXIT_NO_RESULTS
else
print_results "${RES_DIR}"
- if [ "$EXIT" -eq "$EXIT_TC_FAILED" ] ; then
+ if [ $(($EXIT & $EXIT_TC_FAILED)) -gt 0 ] ; then
echo "-------------------------------------------------------------------"
cat $LOG_FILE
echo "-------------------------------------------------------------------"
@@ -327,20 +328,28 @@ function execute_vsperf_sanity() {
echo >> $LOG_FILE
done
echo "Sanity log file $LOG_FILE"
- if [ "$EXIT" -ne "0" ] ; then
+ if [ $(($EXIT & $EXIT_SANITY_TC_FAILED)) -gt 0 ] ; then
echo "-------------------------------------------------------------------"
cat $LOG_FILE
echo "-------------------------------------------------------------------"
fi
}
+# execute pylint to check code quality
+function execute_vsperf_pylint_check() {
+ if ! ./check -b ; then
+ EXIT=$EXIT_PYLINT_FAILED
+ fi
+}
+
# check and install required packages at nodes running VERIFY and MERGE jobs
function dependencies_check() {
. /etc/os-release
if [ $ID == "ubuntu" ] ; then
echo "Dependencies check"
echo "=================="
- for PACKAGE in "python3-tk" "sysstat" ; do
+ # install system packages
+ for PACKAGE in "python3-tk" "sysstat" "bc" ; do
if dpkg -s $PACKAGE &> /dev/null ; then
printf " %-70s %-6s\n" $PACKAGE "OK"
else
@@ -348,6 +357,15 @@ function dependencies_check() {
sudo apt-get install -y $PACKAGE
fi
done
+ # install additional python packages into python environment
+ for PACKAGE in "pylint" ; do
+ if pip show $PACKAGE &> /dev/null ; then
+ printf " %-70s %-6s\n" $PACKAGE "OK"
+ else
+ printf " %-70s %-6s\n" $PACKAGE "missing"
+ pip install $PACKAGE
+ fi
+ done
echo
fi
}
@@ -405,6 +423,7 @@ case $1 in
echo "VSPERF verify job"
echo "================="
+ execute_vsperf_pylint_check
terminate_vsperf
execute_vsperf_sanity
terminate_vsperf
@@ -419,6 +438,7 @@ case $1 in
echo "VSPERF merge job"
echo "================"
+ execute_pylint_check
terminate_vsperf
execute_vsperf_sanity
terminate_vsperf