@@ -16,59 +16,10 @@ nvmetests
1616 DO NOT RUN THEM IF YOU DO NOT KNOW WHAT YOU ARE DOING!
1717
1818 You have been warned.
19-
20- 1. Common Package Dependencies
21- ------------------------------
22-
23- 1. Python(>= 3.3)
24- 2. nose2 (Installation guide http://nose2.readthedocs.io/)
25- 3. flake8 (https://pypi.python.org/pypi/flake8)
26- 4. mypy (https://pypi.org/project/mypy/)
27- 5. autopep8 (https://pypi.org/project/autopep8/)
28- 6. isort (https://pypi.org/project/isort/)
29-
30- Python package management system pip can be used to install most of the
31- listed packages(https://pip.pypa.io/en/stable/installing/) :-
32- $ pip install nose2 flake8 mypy autopep8 isort
33-
34- 2. Overview
35- -----------
36-
37- This framework follows simple class hierarchy. Each test file contains
38- one test. Each test is direct subclass or indirect subclass of TestNVMe
39- class which represents one testcase. To write a new testcase one can copy
40- existing template "nvme_simple_template_test.py" and start adding new
41- testcase specific functionality. For detailed information please look into
42- section 3.
43-
44- For more information about tests, class hierarchy and code please refer :-
45-
46- 1. Documentation :- html/
47- 2. Class Index :- html/index.html
48- 3. Class Hierarchy :- html/class-tree.html
49-
50- For each testcase it will create log directory mentioned in
51- configuration file. This directory will be used for a temporary files
52- and storing execution logs of each testcases. Current implementation stores
53- stdout and stderr for each testcase under log directory, e.g. :-
54-
55- $ tree nvmetests/
56- nvmetests/
57- ├── TestNVMeAttachDetachNSCmd
58- │ ├── stderr.log
59- │ └── stdout.log
60- ├── TestNVMeFlushCmd
61- │ ├── stderr.log
62- │ └── stdout.log
63- └── TestNVMeFormatCmd
64- ├── stderr.log
65- └── stdout.log
66- .
67- .
6819 .
6920
70- 3. Walk-Through Example for writing a new testcase
71- --------------------------------------------------
21+ Walk-Through Example for writing a new testcase
22+ -----------------------------------------------
7223 1. Copy simple test template file from current directory
7324 with appropriate name, replace "simple_template" with testcase name
7425 in new file name. Update config.json if necessary.
@@ -90,11 +41,11 @@ nvmetests
9041 - Example "$ ninja -C .build format-python" will run autopep8 and
9142 isort on all the python files in the current directory.
9243
93- 4. Running testcases with framework
94- -----------------------------------
95- 1. Running single testcase (in the source tree) with nose2 :-
96- $ nose2 --verbose --start-dir tests nvme_writezeros_test
97- $ nose2 --verbose --start-dir tests nvme_read_write_test
44+ Running testcases with framework
45+ --------------------------------
46+ 1. Running single testcase :-
47+ $ python3 tests/tap_runner.py --start-dir tests nvme_id_ctrl_test
48+ $ meson test -C .build 'nvme-cli - nvme_id_ctrl_test'
9849
99- 2. Running all the testcases (in the build root directory) with ninja :-
100- $ ninja test -C .build
50+ 2. Running all the testcases (in the build root directory) :-
51+ $ meson test -C .build
0 commit comments