summaryrefslogtreecommitdiffstats
path: root/verify.sh
diff options
context:
space:
mode:
authorYang Yu <Gabriel.yuyang@huawei.com>2018-01-04 14:10:00 +0800
committerYang Yu <Gabriel.yuyang@huawei.com>2018-01-04 14:14:17 +0800
commitcbd8645b9d529ce26535f0bb9553892c3fce4dc0 (patch)
tree4bd5dc0fe29912a6da6dc48010d3f06fe203e31c /verify.sh
parent97a77626cc17fb372a78ddfc78a66e483315b864 (diff)
Add unit & coverage test
JIRA: BOTTLENECK-219 Using python-nose to run nosetests on unittest and coverage test Change-Id: I3928823bc2f8c65dbe770827ee69da8dd3ced1f2 Signed-off-by: Yang Yu <Gabriel.yuyang@huawei.com>
Diffstat (limited to 'verify.sh')
-rwxr-xr-xverify.sh17
1 files changed, 7 insertions, 10 deletions
diff --git a/verify.sh b/verify.sh
index 1e0d0132..f8668e69 100755
--- a/verify.sh
+++ b/verify.sh
@@ -14,7 +14,7 @@
getopts ":f" FILE_OPTION
run_flake8() {
- echo "Running flake8 ... "
+ echo "Running flake8 for python style check... "
logfile=flake8_verify.log
if [ $FILE_OPTION == "f" ]; then
flake8 --append-config=flake8_cfg testsuites/posca/ utils/ > $logfile
@@ -33,16 +33,13 @@ run_flake8() {
fi
}
-run_tests() {
- echo "Running unittest ... "
- #will add future
+run_nosetests() {
+ echo "Running unit and coverage test ... "
+ nosetests --with-coverage --cover-tests \
+ --cover-min-percentage 100 \
+ test/
}
-run_coverage() {
- echo "Running coverage ..."
- #will add future
-}
run_flake8
-run_tests
-run_coverage
+run_nosetests