Skip to content

Commit 94b33cb

Browse files
dwsuseigaw
authored andcommitted
build: use single string to name tests
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 <[email protected]>
1 parent f38b1d7 commit 94b33cb

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

libnvme/meson.build

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@ if build_python_bindings
6767
test_env.append('PYTHONMALLOC', 'malloc')
6868

6969
# Test section
70-
test('[Python] import libnvme', python3, args: ['-c', 'from libnvme import nvme'], env: test_env, depends: pynvme_clib)
70+
test('python-import-libnvme', python3, args: ['-c', 'from libnvme import nvme'], env: test_env, depends: pynvme_clib)
7171

7272
py_tests = [
73-
[ 'create ctrl object', [ files('tests/create-ctrl-obj.py'), ] ],
74-
[ 'SIGSEGV during gc', [ files('tests/gc.py'), ] ],
75-
[ 'Read NBFT file', [ files('tests/test-nbft.py'), '--filename', join_paths(meson.current_source_dir(), 'tests', 'NBFT') ] ],
73+
[ 'create-ctrl-object', [ files('tests/create-ctrl-obj.py'), ] ],
74+
[ 'sigsegv-during-gc', [ files('tests/gc.py'), ] ],
75+
[ 'read-nbft-file', [ files('tests/test-nbft.py'), '--filename', join_paths(meson.current_source_dir(), 'tests', 'NBFT') ] ],
7676
]
7777
foreach test: py_tests
7878
description = test[0]
7979
args = test[1]
80-
test('[Python] ' + description, python3, args: args, env: test_env, depends: pynvme_clib)
80+
test('python-' + description, python3, args: args, env: test_env, depends: pynvme_clib)
8181
endforeach
8282
endif

test/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if conf.get('HAVE_NETDB')
9292
['test-util.c'],
9393
include_directories: [incdir, internal_incdir]
9494
)
95-
test('Test util.c', test_util)
95+
test('util', test_util)
9696
endif
9797

9898
subdir('ioctl')

0 commit comments

Comments
 (0)