Skip to content

Commit

Permalink
Merge b505cd4 into 083c9f5
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored Oct 17, 2022
2 parents 083c9f5 + b505cd4 commit 1391514
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion examples/placeholder/linux/include/TestCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,21 @@ class TestCommand : public TestRunner,
void Exit(std::string message, CHIP_ERROR err) override
{
LogEnd(message, err);
SetCommandExitStatus(err);

if (CHIP_NO_ERROR == err)
{
chip::DeviceLayer::PlatformMgr().ScheduleWork(ScheduleExit, reinterpret_cast<intptr_t>(this));
}
else
{
SetCommandExitStatus(err);
}
}

static void ScheduleExit(intptr_t context)
{
TestCommand * command = reinterpret_cast<TestCommand *>(context);
command->SetCommandExitStatus(CHIP_NO_ERROR);
}

static void ScheduleNextTest(intptr_t context)
Expand Down

0 comments on commit 1391514

Please sign in to comment.