Fix TargetPresent to work as a new style step

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2023-03-25 07:51:22 +00:00
parent bf7e22b4a6
commit d7c17203e0

View File

@ -220,7 +220,7 @@ class TargetPresent(shell.ShellCommand):
def evaluateCommand(self, cmd):
# If the command fails, fall back to old style run-config execution
rc = super().evaluateCommand(cmd)
rc = cmd.results()
if rc != SUCCESS:
self.descriptionDone = "Target not present in branch configuration"
self.build.results = SKIPPED
@ -228,3 +228,9 @@ class TargetPresent(shell.ShellCommand):
self.build.terminate = True
return SKIPPED
return SUCCESS
@defer.inlineCallbacks
def run(self):
cmd = yield self.makeRemoteShellCommand()
yield self.runCommand(cmd)
return self.evaluateCommand(cmd)