Skip to content

Commit

Permalink
Make tests more verbose.
Browse files Browse the repository at this point in the history
  • Loading branch information
corranwebster committed Sep 16, 2024
1 parent b7dbd84 commit a3cec0a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ci/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@
@click.command()
def test():
"""Run unit tests in micropython"""
print("Running Tests")
failures = []
test_dir = Path("tests/ultimo")
os.environ["MICROPYPATH"] = "src:" + os.environ.get('MICROPYPATH', ":.frozen:~/.micropython/lib:/usr/lib/micropython")
for path in sorted(test_dir.glob("*.py")):
print(path.name, "... ", end="", flush=True)
result = run_test(path)
if result:
failures.append(result)
print('F', end='', flush=True)
print('FAILED')
else:
print('.', end='', flush=True)
print('OK')
print()

for path, stdout, stderr in failures:
Expand All @@ -37,6 +39,8 @@ def test():

if failures:
sys.exit(1)
else:
print("PASSED")


def run_test(path):
Expand Down

0 comments on commit a3cec0a

Please sign in to comment.