unittest: power-haltests: Restart PASS daemon when PutResource tc is failed 73/263173/1 accepted/tizen/unified/20210827.110834 submit/tizen/20210827.070901
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 27 Aug 2021 07:00:25 +0000 (16:00 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 27 Aug 2021 07:00:25 +0000 (16:00 +0900)
Even if PutResource tc is failed, need to restore the status of PASS
daemon. So that restart PASS daemon.

Change-Id: I3c4dab4f30a16660f0718bc1cd579afa15f75fbf
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
unittest/power-haltests.cpp

index 0e0e82814102a3abea544f0ed20198caf0774662..bc9bb6839f968f29bbaaa49032ec1c236b608dd5 100644 (file)
@@ -543,6 +543,10 @@ TEST_F(PowerHaltest, PutResourceConfig_HandlesValidInput)
                ret = pass_hal_put_resource(res);
                if (ret < 0) {
                        pass_parser_put_resource_config(&g_pass);
+
+                       /* Even if tc is failed, need to restart PASS daemon */
+                       pass_test_method_call(DBUS_CORE_PATH, DBUS_CORE_INTERFACE,
+                                       "start", NULL);
                        ASSERT_EQ(ret, 0) << "PutResourceConfig Failed";
                }
        }