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

Log more information when "darwin-framework-tool tests list" fails. #29625

Merged
merged 1 commit into from
Oct 6, 2023
Merged
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
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
Loading