Skip to content

Commit

Permalink
Log more information when "darwin-framework-tool tests list" fails. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Jan 8, 2024
1 parent 88cc91b commit 2255381
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scripts/tests/chiptest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#

import json
import logging
import os
import subprocess
from dataclasses import dataclass
Expand Down Expand Up @@ -246,16 +247,21 @@ def tests_with_command(chip_tool: str, is_manual: bool):
if is_manual:
cmd += "-manual"

result = subprocess.run([chip_tool, "tests", cmd], capture_output=True)
result.check_returncode()
cmd = [chip_tool, "tests", cmd]
result = subprocess.run(cmd, capture_output=True, encoding="utf-8")
if result.returncode != 0:
logging.error(f'Failed to run {cmd}:')
logging.error('STDOUT: ' + result.stdout)
logging.error('STDERR: ' + result.stderr)
result.check_returncode()

test_tags = set()
if is_manual:
test_tags.add(TestTag.MANUAL)

in_development_tests = [s.replace(".yaml", "") for s in _GetInDevelopmentTests()]

for name in result.stdout.decode("utf8").split("\n"):
for name in result.stdout.split("\n"):
if not name:
continue

Expand Down

0 comments on commit 2255381

Please sign in to comment.