]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
build: use single string to name tests
authorDaniel Wagner <dwagner@suse.de>
Tue, 19 Dec 2023 21:11:53 +0000 (22:11 +0100)
committerDaniel Wagner <wagi@monom.org>
Wed, 20 Dec 2023 08:04:08 +0000 (09:04 +0100)
In order to be able to select to run a given test by name, use a single
string which makes it way simpler to execute, e.g.

  meson test -C .build --gdb python-import-libnvme

Signed-off-by: Daniel Wagner <dwagner@suse.de>
libnvme/meson.build
test/meson.build

index 12a601e88a5b07906f341f3aa9f11e4a3d7a158c..b5b99fc59bec59ad71f8d977eea22e80e4ec1e26 100644 (file)
@@ -67,16 +67,16 @@ if build_python_bindings
     test_env.append('PYTHONMALLOC', 'malloc')
 
     # Test section
-    test('[Python] import libnvme', python3, args: ['-c', 'from libnvme import nvme'], env: test_env, depends: pynvme_clib)
+    test('python-import-libnvme', python3, args: ['-c', 'from libnvme import nvme'], env: test_env, depends: pynvme_clib)
 
     py_tests = [ 
-        [ 'create ctrl object', [ files('tests/create-ctrl-obj.py'), ] ],
-        [ 'SIGSEGV during gc', [ files('tests/gc.py'), ] ],
-        [ 'Read NBFT file', [ files('tests/test-nbft.py'), '--filename', join_paths(meson.current_source_dir(), 'tests', 'NBFT') ] ],
+        [ 'create-ctrl-object', [ files('tests/create-ctrl-obj.py'), ] ],
+        [ 'sigsegv-during-gc', [ files('tests/gc.py'), ] ],
+        [ 'read-nbft-file', [ files('tests/test-nbft.py'), '--filename', join_paths(meson.current_source_dir(), 'tests', 'NBFT') ] ],
     ]
     foreach test: py_tests
         description = test[0]
         args = test[1]
-        test('[Python] ' + description, python3, args: args, env: test_env, depends: pynvme_clib)
+        test('python-' + description, python3, args: args, env: test_env, depends: pynvme_clib)
     endforeach
 endif
index 71be57c08c73455ca4658169daee021b6e216564..2b4c6d80011958b8969b26ea31f0b46e2e91aecd 100644 (file)
@@ -92,7 +92,7 @@ if conf.get('HAVE_NETDB')
         ['test-util.c'],
         include_directories: [incdir, internal_incdir]
     )
-    test('Test util.c', test_util)
+    test('util', test_util)
 endif
 
 subdir('ioctl')