test-runner: Enable bluetoothd debug when running with -d
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 26 Aug 2021 16:30:31 +0000 (09:30 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:36 +0000 (19:08 +0530)
This enable bluetoothd debug when running with -d.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tools/test-runner.c

index 923cf3d..45b66df 100755 (executable)
@@ -467,7 +467,7 @@ static const char *daemon_table[] = {
 static pid_t start_bluetooth_daemon(const char *home)
 {
        const char *daemon = NULL;
-       char *argv[5], *envp[2];
+       char *argv[6], *envp[2];
        pid_t pid;
        struct stat st;
        int i;
@@ -494,12 +494,13 @@ static pid_t start_bluetooth_daemon(const char *home)
 
        argv[0] = (char *) daemon;
        argv[1] = "--nodetach";
-       argv[2] = NULL;
+       argv[2] = "-d";
+       argv[3] = NULL;
 
        if (!stat("src/main.conf", &st)) {
-               argv[2] = "-f";
-               argv[3] = "src/main.conf";
-               argv[4] = NULL;
+               argv[3] = "-f";
+               argv[4] = "src/main.conf";
+               argv[5] = NULL;
        }
 
        envp[0] = "DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket";