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
17 echo "========================================="
18 echo "Running flake8 for python style check: "
19 echo "-----------------------------------------"
20 logfile=flake8_verify.log
21 if [ $FILE_OPTION == "f" ]; then
22 flake8 --append-config=flake8_cfg testsuites/posca/ utils/ > $logfile
24 flake8 --append-config=flake8_cfg testsuites/posca/ utils/
29 if [ $FILE_OPTION == "f" ]; then
30 echo "Results in $logfile"
34 echo "The patch has passed python style check "
35 echo "===================END==================="
41 echo "========================================="
42 echo "Running unit and coverage test: "
43 echo "-----------------------------------------"
44 nosetests --with-coverage --cover-tests \
45 --cover-min-percentage 100 \
47 testsuites/posca/__init__.py testsuites/__init__.py \
48 testsuites/posca/testcase_cfg/__init__.py \
49 testsuites/posca/testcase_dashboard/__init__.py \
50 testsuites/posca/testcase_script/__init__.py \
52 utils/dashboard/__init__.py \
53 utils/env_prepare/__init__.py \
54 utils/infra_setup/__init__.py \
56 monitor/config/__init__.py
57 echo "===================END==================="
62 for((i=1;i<=1;i++));do echo -e "\n";done
65 for((i=1;i<=1;i++));do echo -e "\n";done