3 ##############################################################################
4 # Copyright (c) 2016 Huawei Tech and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
12 # Run flake8, unit, coverage test
14 echo "Running unit tests..."
16 virtualenv ./bottlenecks_venv
17 source ./bottlenecks_venv/bin/activate
19 # install python packages
20 #easy_install -U setuptools
22 pip install -r ./requirements/verify.txt
24 getopts ":f" FILE_OPTION
28 echo "========================================="
29 echo "Running flake8 for python style check: "
30 echo "-----------------------------------------"
31 logfile=flake8_verify.log
32 if [ $FILE_OPTION == "f" ]; then
33 flake8 --config=flake8_cfg ${STYLE_CHECK_DIRS} > $logfile
35 flake8 --config=flake8_cfg ${STYLE_CHECK_DIRS}
40 if [ $FILE_OPTION == "f" ]; then
41 echo "Results in $logfile"
45 echo "The patch has passed python style check "
46 echo "===================END==================="
51 echo "========================================="
52 echo "Running yamllint for yaml style check: "
53 echo "-----------------------------------------"
54 logfile=yamllint_verify.log
59 if [ $FILE_OPTION == "f" ]; then
60 echo "Results in $logfile"
64 echo "The patch has passed yaml style check "
65 echo "===================END==================="
70 echo "========================================="
71 echo "Running unit and coverage test: "
72 echo "-----------------------------------------"
73 echo "Do not include any coverage test yet..."
74 echo "===================END==================="
79 for((i=1;i<=1;i++));do echo -e "\n";done
82 for((i=1;i<=1;i++));do echo -e "\n";done
85 for((i=1;i<=1;i++));do echo -e "\n";done