[PATCH V2 46/46] nvmftests: add Makefile
Chaitanya Kulkarni
ckulkarnilinux at gmail.com
Tue Oct 24 18:31:03 PDT 2017
From: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
tools/testing/selftests/nvmftests/Makefile | 63 ++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
create mode 100644 tools/testing/selftests/nvmftests/Makefile
diff --git a/tools/testing/selftests/nvmftests/Makefile b/tools/testing/selftests/nvmftests/Makefile
new file mode 100644
index 0000000..ecb523a
--- /dev/null
+++ b/tools/testing/selftests/nvmftests/Makefile
@@ -0,0 +1,63 @@
+# 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 <chaitanya.kulkarni at wdc.com>
+#
+
+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."
+
+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
+
+.PHONY: doc clean cleanall
--
1.8.3.1
More information about the Linux-nvme
mailing list