The test_nvmet.py by default uses /dev/ram0 and /dev/ram1 for 2 of the
unit tests. Add env. variable to allow user to specify different devices
or files. Additionally, skip these unit tests that require devices/files
if they are not present. Update README too.
$ sudo make test
......s...s.
----------------------------------------------------------------------
Ran 12 tests in 0.043s
OK (skipped=2)
Name Stmts Miss Cover
-----------------------------------------
nvmet/__init__.py 1 0 100%
nvmet/nvme.py 517 237 54%
nvmet/test_nvmet.py 276 63 77%
-----------------------------------------
TOTAL 794 300 62%
$ sudo NVMET_TEST_DEVICES="/dev/sdc,/dev/sdd" make test
............
----------------------------------------------------------------------
Ran 12 tests in 0.124s
OK
Name Stmts Miss Cover
-----------------------------------------
nvmet/__init__.py 1 0 100%
nvmet/nvme.py 517 100 81%
nvmet/test_nvmet.py 276 4 99%
-----------------------------------------
TOTAL 794 104 87%
Signed-off-by: Tony Asleson <tasleson@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>