Skip to content

Commit 728decc

Browse files
committed
meson: add 'raw' test suite
The 'raw' test suite runs each compiled test without the runtest*.sh wrapper scripts. This is useful to debug tests using meson's gdb support. To debug a test in gdb run `meson test -C build --suite=raw <testname>_raw` Signed-off-by: Florian Fischer <florian.fischer@muhq.space>
1 parent 6ac0479 commit 728decc

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

test/meson.build

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,15 @@ fs = import('fs')
172172

173173
foreach test_source: all_tests
174174
test_name = fs.stem(test_source)
175-
executable(test_name,
176-
[test_source, 'helpers.c'],
177-
c_args: xcflags,
178-
cpp_args: xcflags,
179-
include_directories: liburing_internal_includes,
180-
link_with: liburing.get_static_lib(),
181-
dependencies: test_dependencies,
182-
install: true,
183-
install_dir: get_option('datadir') / 'liburing-test')
175+
test_exe = executable(test_name,
176+
[test_source, 'helpers.c'],
177+
c_args: xcflags,
178+
cpp_args: xcflags,
179+
include_directories: liburing_internal_includes,
180+
link_with: liburing.get_static_lib(),
181+
dependencies: test_dependencies,
182+
install: true,
183+
install_dir: get_option('datadir') / 'liburing-test')
184184

185185
test(test_name,
186186
runtests_sh,
@@ -201,6 +201,10 @@ foreach test_source: all_tests
201201
args: test_name,
202202
workdir: meson.current_build_dir(),
203203
suite: 'parallel')
204+
205+
test(test_name + '_raw',
206+
test_exe,
207+
suite: 'raw')
204208
endforeach
205209

206210
add_test_setup('runtests',

0 commit comments

Comments
 (0)