Skip to content

Commit

Permalink
build: use single string to name tests
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
igaw committed Dec 19, 2023
1 parent f38b1d7 commit 4e684f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions libnvme/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 4e684f8

Please sign in to comment.