subdir('ccan')
subdir('plugins')
-subdir('tests')
+subdir('unit')
+if get_option('nvme-tests')
+ subdir('tests')
+endif
subdir('util')
subdir('Documentation')
option('systemddir', type : 'string', value : 'lib/systemd/system', description : 'directory for systemd files')
option('htmldir', type : 'string', value : '', description : 'directory for HTML documentation')
option('systemctl', type : 'string', value : '/usr/bin/systemctl', description : 'path to systemctl binary')
-
+option('nvme-tests', type : 'boolean', value : false, description: 'Run tests against real hardware')
option('docs', type : 'combo', choices : ['false', 'html', 'man', 'all'], description : 'install documentation')
option('docs-build', type : 'boolean', value : false, description : 'build documentation')
nvmetests
=========
- This contains NVMe unit tests framework. The purpose of this framework
+ This contains a NVMe tests framework. The purpose of this framework
to use nvme cli and test various supported commands and scenarios for
NVMe device.
- In current implementation this framework uses nvme cli to
+ In current implementation this framework uses nvme-cli to
interact with underlying controller/namespace.
+ Note these tests expect to run against real hardware and will
+ read and write data to /dev/nvme0!
+
+ DO NOT RUN THEM IF YOU DO NOT KNOW WHAT YOU ARE DOING!
+
+ You have been warned.
+
1. Common Package Dependencies
------------------------------
endforeach
endif
-test_uint128 = executable(
- 'test-uint128',
- ['test-uint128.c', '../util/types.c'],
- include_directories: [incdir, '..'],
- dependencies: [libnvme_dep],
-)
-
-test('uint128', test_uint128)
-
-test_suffix_si_parse = executable(
- 'test-suffix-si-parse',
- ['test-suffix-si-parse.c', '../util/suffix.c'],
- include_directories: [incdir, '..'],
- dependencies: [libnvme_dep],
-)
-
-test('suffix_si_parse', test_suffix_si_parse)
-
python_module = import('python')
python = python_module.find_installation('python3')
--- /dev/null
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+test_uint128 = executable(
+ 'test-uint128',
+ ['test-uint128.c', '../util/types.c'],
+ include_directories: [incdir, '..'],
+ dependencies: [libnvme_dep],
+)
+
+test('uint128', test_uint128)
+
+test_suffix_si_parse = executable(
+ 'test-suffix-si-parse',
+ ['test-suffix-si-parse.c', '../util/suffix.c'],
+ include_directories: [incdir, '..'],
+ dependencies: [libnvme_dep],
+)
+
+test('suffix_si_parse', test_suffix_si_parse)