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 getopts ":f" FILE_OPTION
15 STYLE_CHECK_DIRS="testsuites/posca/ utils/ monitor/"
18 echo "========================================="
19 echo "Running flake8 for python style check: "
20 echo "-----------------------------------------"
21 logfile=flake8_verify.log
22 if [ $FILE_OPTION == "f" ]; then
23 flake8 --append-config=flake8_cfg ${STYLE_CHECK_DIRS} > $logfile
25 flake8 --append-config=flake8_cfg ${STYLE_CHECK_DIRS}
30 if [ $FILE_OPTION == "f" ]; then
31 echo "Results in $logfile"
35 echo "The patch has passed python style check "
36 echo "===================END==================="
42 echo "========================================="
43 echo "Running unit and coverage test: "
44 echo "-----------------------------------------"
45 nosetests --with-coverage --cover-tests \
46 --cover-min-percentage 100 \
48 testsuites/posca/__init__.py testsuites/__init__.py \
49 testsuites/posca/testcase_cfg/__init__.py \
50 testsuites/posca/testcase_dashboard/__init__.py \
51 testsuites/posca/testcase_script/__init__.py \
53 utils/dashboard/__init__.py \
54 utils/env_prepare/__init__.py \
55 utils/infra_setup/__init__.py \
57 monitor/dashboard/__init__.py \
58 monitor/dispatch/__init__.py
59 echo "===================END==================="
64 for((i=1;i<=1;i++));do echo -e "\n";done
67 for((i=1;i<=1;i++));do echo -e "\n";done