Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Remove unused DelayCommands functions #18534

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions scripts/tests/chiptest/accessories.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,6 @@ def factoryReset(self, name):
return accessory.factoryReset()
return False

def waitForCommissionableAdvertisement(self, name):
accessory = self.__accessories[name]
if accessory:
return accessory.waitForCommissionableAdvertisement()
return False

def waitForOperationalAdvertisement(self, name):
accessory = self.__accessories[name]
if accessory:
return accessory.waitForOperationalAdvertisement()
return False

def waitForMessage(self, name, message):
accessory = self.__accessories[name]
if accessory:
Expand All @@ -119,15 +107,7 @@ def __startXMLRPCServer(self):
self.server.register_function(self.stop, 'stop')
self.server.register_function(self.reboot, 'reboot')
self.server.register_function(self.factoryReset, 'factoryReset')
self.server.register_function(
self.waitForCommissionableAdvertisement,
'waitForCommissionableAdvertisement')
self.server.register_function(
self.waitForOperationalAdvertisement,
'waitForOperationalAdvertisement')
self.server.register_function(
self.waitForMessage,
'waitForMessage')
self.server.register_function(self.waitForMessage, 'waitForMessage')

self.server_thread = threading.Thread(target=self.server.serve_forever)
self.server_thread.start()
Expand Down
10 changes: 0 additions & 10 deletions scripts/tests/chiptest/test_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,6 @@ def factoryReset(self):
def waitForAnyAdvertisement(self):
self.__waitFor("mDNS service published:", self.process, self.outpipe)

def waitForCommissionableAdvertisement(self):
self.__waitFor("mDNS service published: _matterc._udp",
self.process, self.outpipe)
return True

def waitForOperationalAdvertisement(self):
self.__waitFor("mDNS service published: _matter._tcp",
self.process, self.outpipe)
return True

def waitForMessage(self, message):
self.__waitFor(message, self.process, self.outpipe)
return True
Expand Down
22 changes: 0 additions & 22 deletions src/app/tests/suites/commands/delay/DelayCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,6 @@ void DelayCommands::OnWaitForMsFn(chip::System::Layer * systemLayer, void * cont
command->OnWaitForMs();
}

CHIP_ERROR DelayCommands::WaitForCommissionableAdvertisement(
const char * identity, const chip::app::Clusters::DelayCommands::Commands::WaitForCommissionableAdvertisement::Type & value)
{
const char * scriptDir = getScriptsFolder();
constexpr const char * scriptName = "WaitForCommissionableAdvertisement.py";

char command[128];
VerifyOrReturnError(snprintf(command, sizeof(command), "%s%s", scriptDir, scriptName) >= 0, CHIP_ERROR_INTERNAL);
return RunInternal(command);
}

CHIP_ERROR DelayCommands::WaitForOperationalAdvertisement(
const char * identity, const chip::app::Clusters::DelayCommands::Commands::WaitForOperationalAdvertisement::Type & value)
{
const char * scriptDir = getScriptsFolder();
constexpr const char * scriptName = "WaitForOperationalAdvertisement.py";

char command[128];
VerifyOrReturnError(snprintf(command, sizeof(command), "%s%s", scriptDir, scriptName) >= 0, CHIP_ERROR_INTERNAL);
return RunInternal(command);
}

CHIP_ERROR DelayCommands::WaitForMessage(const char * identity,
const chip::app::Clusters::DelayCommands::Commands::WaitForMessage::Type & value)
{
Expand Down
5 changes: 0 additions & 5 deletions src/app/tests/suites/commands/delay/DelayCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ class DelayCommands
return CHIP_ERROR_NOT_IMPLEMENTED;
};
CHIP_ERROR WaitForMs(const char * identity, const chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type & value);
CHIP_ERROR WaitForCommissionableAdvertisement(
const char * identity,
const chip::app::Clusters::DelayCommands::Commands::WaitForCommissionableAdvertisement::Type & value);
CHIP_ERROR WaitForOperationalAdvertisement(
const char * identity, const chip::app::Clusters::DelayCommands::Commands::WaitForOperationalAdvertisement::Type & value);
// Wait for any message specified by value.message for the application specified by value.registerKey
// If the message is never seen, a timeout would occur
CHIP_ERROR WaitForMessage(const char * identity,
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,13 @@ const WaitForCommissionee = {
arguments : [ { type : 'NODE_ID', name : 'nodeId' } ],
};

const WaitForCommissionableAdvertisement = {
name : 'WaitForCommissionableAdvertisement',
};

const WaitForOperationalAdvertisement = {
name : 'WaitForOperationalAdvertisement',
};

const WaitForMessage = {
name : 'WaitForMessage',
arguments : [ { type : 'CHAR_STRING', name : 'registerKey', isOptional : true }, { type : 'CHAR_STRING', name : 'message' } ],
};

const name = 'DelayCommands';
const commands = [
WaitForMs, WaitForCommissioning, WaitForCommissionee, WaitForCommissionableAdvertisement, WaitForOperationalAdvertisement,
WaitForMessage
];
const commands = [ WaitForMs, WaitForCommissioning, WaitForCommissionee, WaitForMessage ];

const DelayCommands = {
name,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.