Diff between 10d1acb1f41bb583e2ac99d739d1efbeb84828bf and a19b0d594b95ae49e1cfa99dfe874268119bf146

Changed Files

File Additions Deletions Status
tools/test-runner.c +8 -2 modified

Full Patch

diff --git a/tools/test-runner.c b/tools/test-runner.c
index 96de703..21897b6 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -468,8 +468,9 @@ static const char *daemon_table[] = {
 static pid_t start_bluetooth_daemon(const char *home)
 {
 	const char *daemon = NULL;
-	char *argv[3], *envp[2];
+	char *argv[5], *envp[2];
 	pid_t pid;
+	struct stat st;
 	int i;
 
 	if (chdir(home + 5) < 0) {
@@ -478,7 +479,6 @@ static pid_t start_bluetooth_daemon(const char *home)
 	}
 
 	for (i = 0; daemon_table[i]; i++) {
-		struct stat st;
 
 		if (!stat(daemon_table[i], &st)) {
 			daemon = daemon_table[i];
@@ -497,6 +497,12 @@ static pid_t start_bluetooth_daemon(const char *home)
 	argv[1] = "--nodetach";
 	argv[2] = NULL;
 
+	if (!stat("src/main.conf", &st)) {
+		argv[2] = "-f";
+		argv[3] = "src/main.conf";
+		argv[4] = NULL;
+	}
+
 	envp[0] = "DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket";
 	envp[1] = NULL;