tools/mgmt-tester: Adjust test setup complete check
authorInga Stotland <inga.stotland@intel.com>
Thu, 3 Jun 2021 00:04:15 +0000 (17:04 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000 (19:08 +0530)
This changes check for setup complete in client_cmd_complete() callback
from tester_setup_complete() to test_setup_condition_complete(). This
allows for combining setup conditions when setup_bthost() is called.
Reviewed-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tools/mgmt-tester.c

index 02525c9..d7a7051 100755 (executable)
@@ -5831,7 +5831,7 @@ static void client_cmd_complete(uint16_t opcode, uint8_t status,
        if (status)
                tester_setup_failed();
        else
-               tester_setup_complete();
+               test_setup_condition_complete(data);
 }
 
 static void setup_bthost(void)
@@ -5842,6 +5842,7 @@ static void setup_bthost(void)
 
        bthost = hciemu_client_get_host(data->hciemu);
        bthost_set_cmd_complete_cb(bthost, client_cmd_complete, data);
+       test_add_setup_condition(data);
 
        if (data->hciemu_type == HCIEMU_TYPE_LE ||
                test->client_enable_adv) {