[PATCH BlueZ v9 09/15] unit: Make gobex-transfer tests run concurrently

Bastien Nocera
2026-04-24T09:13:42Z

---
unit/meson.build | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/unit/meson.build b/unit/meson.build
index 1bd3b7a85992..92e1c6f66caa 100644
--- a/unit/meson.build
+++ b/unit/meson.build
@@ -71,15 +71,18 @@ tests3 = [
[ 'test-avctp.c', '../src/log.c', 'avctp.c' ],
[ 'test-util.c' ],
]
+tests4 = []

if ical_dep.found()
tests3 += [
[ 'test-gobex.c', 'util.c', gobex_sources ],
[ 'test-gobex-packet.c', 'util.c', gobex_sources ],
[ 'test-gobex-header.c', 'util.c', gobex_sources ],
- [ 'test-gobex-transfer.c', 'util.c', gobex_sources ],
[ 'test-gobex-apparam.c', 'util.c', gobex_sources ],
]
+ tests4 = [
+ [ 'test-gobex-transfer.c', 'util.c', gobex_sources ],
+ ]
endif

foreach t: tests3
@@ -93,6 +96,22 @@ foreach t: tests3
test(test_name, exe)
endforeach

+foreach t: tests4
+ test_name = t[0].substring(0, -2)
+ exe = executable(test_name,
+ sources: t,
+ c_args: [ '-DSTORAGEDIR="@0"'.format(storagedir) ],
+ include_directories: '../lib',
+ dependencies: libshared_glib_dep
+ )
+
+ r = run_command(sh, unittest_list, t, check: true)
+ unit_tests = r.stdout().strip().split(' ')
+ foreach ut: unit_tests
+ test(ut, exe, args: [ '-p', ut ])
+ endforeach
+endforeach
+
exe = executable('test-gdbus-client',
sources: 'test-gdbus-client.c',
dependencies: [ libgdbus_internal_dep, libshared_glib_dep ]
--
2.53.0