diff --git a/examples/chip-tool/commands/tests/TestCommand.h b/examples/chip-tool/commands/tests/TestCommand.h index 4fc8641f531d0b..a8165ae57285c2 100644 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ b/examples/chip-tool/commands/tests/TestCommand.h @@ -49,14 +49,17 @@ class TestCommand : public CHIPCommand, { AddArgument("delayInMs", 0, UINT64_MAX, &mDelayInMs); AddArgument("PICS", &mPICSFilePath); + AddArgument("testTimeoutInS", 0, UINT16_MAX, &mTimeout); } ~TestCommand(){}; /////////// CHIPCommand Interface ///////// CHIP_ERROR RunCommand() override; - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(kTimeoutInSeconds); } - + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } virtual void NextTest() = 0; protected: