From a409404c5387ea09f0d880b28a1aae65dae73780 Mon Sep 17 00:00:00 2001 From: Dan Fornika Date: Wed, 12 Jun 2024 16:19:25 -0700 Subject: [PATCH] Print results of check_outputs --- .github/scripts/check_outputs.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/scripts/check_outputs.py b/.github/scripts/check_outputs.py index 88c1f55..e788996 100755 --- a/.github/scripts/check_outputs.py +++ b/.github/scripts/check_outputs.py @@ -5,6 +5,7 @@ import glob import json import os +import sys import urllib.request from jsonschema import validate @@ -94,14 +95,17 @@ def main(args): output_path = args.output with open(output_path, 'w') as f: - writer = csv.DictWriter(f, fieldnames=output_fields, extrasaction='ignore') - writer.writeheader() + file_writer = csv.DictWriter(f, fieldnames=output_fields, extrasaction='ignore') + stdout_writer = csv.DictWriter(sys.stdout, fieldnames=output_fields, extrasaction='ignore') + stdout_writer.writeheader() + file_writer.writeheader() for test in tests: if test["test_passed"]: test["test_result"] = "PASS" else: test["test_result"] = "FAIL" - writer.writerow(test) + stdout_writer.writerow(test) + file_writer.writerow(test) for test in tests: if not test['test_passed']: