diff mbox series

[v2,2/3] test-runner: start dbus with --start

Message ID 20220719185223.456197-2-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [v2,1/3] test-runner: allow infinite process wait | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood July 19, 2022, 6:52 p.m. UTC
Starts dbus-daemon as well as sets the right environment variables
so IWD can start (and any other dbus services).
---
 tools/run-tests | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

v2:
 - Rebased so it would apply cleanly.
diff mbox series

Patch

diff --git a/tools/run-tests b/tools/run-tests
index 8f84c844..e45ffe46 100755
--- a/tools/run-tests
+++ b/tools/run-tests
@@ -1037,7 +1037,12 @@  atexit.register(exit_vm)
 runner.prepare_environment()
 
 if runner.args.start:
-	os.system(runner.args.start)
+	ctx = TestContext(runner.args)
+	ctx.start_dbus()
+	os.chdir(runner.args.testhome)
+	os.environ['DBUS_SYSTEM_BUS_ADDRESS'] = ctx.dbus_address
+
+	subprocess.run([runner.args.start])
 else:
 	run_tests(runner.args)