Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH v2 2/3] test-runner: start dbus with --start
Date: Tue, 19 Jul 2022 11:52:22 -0700	[thread overview]
Message-ID: <20220719185223.456197-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20220719185223.456197-1-prestwoj@gmail.com>

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 --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)
 
-- 
2.34.1


  reply	other threads:[~2022-07-19 18:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 18:52 [PATCH v2 1/3] test-runner: allow infinite process wait James Prestwood
2022-07-19 18:52 ` James Prestwood [this message]
2022-07-19 18:52 ` [PATCH v2 3/3] test-runner: automatically find PCI passthrough config James Prestwood
2022-07-19 19:33 ` [PATCH v2 1/3] test-runner: allow infinite process wait Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220719185223.456197-2-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox