diff mbox series

[liburing,7/9] meson: add 'raw' test suite

Message ID 20220727152723.3320169-8-florian.fischer@muhq.space (mailing list archive)
State New
Headers show
Series [liburing,1/9] add Meson build system | expand

Commit Message

Florian Fischer July 27, 2022, 3:27 p.m. UTC
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>
---
 test/meson.build | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/test/meson.build b/test/meson.build
index 1537ad9..088b5fa 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -166,15 +166,15 @@  foreach test_source: all_tests
     # using the meson filesystem module would solve this restriction
     # but require to bump our minimum meson version to '>= 0.54'.
     test_name = test_source.split()[0]
-    executable(test_name,
-               [test_source, 'helpers.c'],
-               c_args: xcflags,
-               cpp_args: xcflags,
-               include_directories: liburing_internal_includes,
-               link_with: liburing.get_static_lib(),
-               dependencies: test_dependencies,
-               install: true,
-               install_dir: get_option('datadir') / 'liburing-test')
+    test_exe = executable(test_name,
+                          [test_source, 'helpers.c'],
+                          c_args: xcflags,
+                          cpp_args: xcflags,
+                          include_directories: liburing_internal_includes,
+                          link_with: liburing.get_static_lib(),
+                          dependencies: test_dependencies,
+                          install: true,
+                          install_dir: get_option('datadir') / 'liburing-test')
 
     test(test_name,
          runtests_sh,
@@ -195,6 +195,10 @@  foreach test_source: all_tests
          args: test_name,
          workdir: meson.current_build_dir(),
          suite: 'parallel')
+
+    test(test_name + '_raw',
+         test_exe,
+         suite: 'raw')
 endforeach
 
 if meson.version().version_compare('>=0.57')