-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
70 lines (60 loc) · 1.97 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright (c) 2016-2017 Western Digital Corporation or its affiliates.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
# Author: Chaitanya Kulkarni <[email protected]>
#
PREFIX?=/opt
help: all
all:
@echo "Usage:"
@echo
@echo " make run - Run all testcases."
@echo " make doc - Generate Documentation."
@echo " make cleanall - removes *pyc, documentation."
@echo " make static_check- runs pep8, flake8, and pylint on code."
@echo " make install - copy test suite to ${PREFIX}/nvmftests
doc:
@make -C doc/
run:
@ln -s tests/config config
nose2 --verbose
@rm -fr config
static_check:
for i in `find . -name \*.py | grep -v __init__ | grep -v state_machine`;\
do\
echo "Pylint :- " ;\
printf "%10s " $${i};\
pylint $${i} 2>&1 | grep "^Your code" | awk '{print $$7}';\
echo "--------------------------------------------";\
echo "pep8 :- ";\
pep8 $${i};\
echo "flake8 :- ";\
flake8 $${i};\
done
cleanall: clean
@rm -fr tests/logs tests/*fio.log loop.json logs
@find . -name \*_fio.log | xargs rm -fr
@make -C doc/ clean
clean:
@rm -fr config
@find . -name \*pyc | xargs rm -fr
@find . -name __pycache__ | xargs rm -fr
@find . -name \*ropeproject | xargs rm -fr
install:
@mkdir -p ${PREFIX}/nvmftest
@cp -r * ${PREFIX}/nvmftest
.PHONY: doc clean cleanall