Skip to content

Commit

Permalink
Apply feedback.
Browse files Browse the repository at this point in the history
Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: pr HarnessUnitTest DfuseMUPerms

Required-githooks: true

Signed-off-by: Phil Henderson <phillip.henderson@intel.com>
  • Loading branch information
phender committed Aug 7, 2024
1 parent ec31b20 commit 33a7238
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/tests/ftest/util/run_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,15 @@ def iter_retcodes(self):
Yields:
tuple: return code (int), hosts (list)
"""
for return_code, hosts in self._return_codes.items():
yield return_code, hosts
yield from self._return_codes.items()

def iter_keys_timeout(self):
"""Iterate over hosts that timed out.
Yields:
str: host where the command timed out
"""
for host in self._timeout_sources:
yield host
yield from self._timeout_sources

def iter_buffers(self, match_keys=None):
"""Iterate over the command stdout for each host.
Expand Down Expand Up @@ -418,10 +416,11 @@ def run_local(log, command, verbose=True, timeout=None, stderr=False, capture_ou
task = LocalTask(local_host, 255, None, str(error), False)

results = CommandResult(command, task)
if verbose:
if capture_output and verbose:
# Log any captured command output when requested
results.log_output(log)
else:
# Always log any failed commands
elif capture_output:
# Always log any failed commands whose output was captured
for data in results.output:
if not data.passed:
log_result_data(log, data)
Expand Down

0 comments on commit 33a7238

Please sign in to comment.