diff --git a/.github/scripts/check_outputs.py b/.github/scripts/check_outputs.py index 82bb4fb..0387c44 100755 --- a/.github/scripts/check_outputs.py +++ b/.github/scripts/check_outputs.py @@ -6,6 +6,7 @@ import hashlib import json import os +import sys from pathlib import Path @@ -291,17 +292,22 @@ def main(args): output_path = os.path.join(args.outdir, "check_outputs_summary.csv") 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', delimiter='\t') + stdout_writer.writeheader() + file_writer.writeheader() for test in tests: test["test_result"] = "FAIL" if test["test_passed"]: test["test_result"] = "PASS" - writer.writerow(test) + stdout_writer.writerow(test) + file_writer.writerow(test) for test in tests: if not test['test_passed']: + print(f"\nTest: {test['test_name']} failed.") + print(f"See {output_path} for more details.") exit(1) diff --git a/.github/scripts/check_outputs.sh b/.github/scripts/check_outputs.sh index 175f12c..6c7452e 100755 --- a/.github/scripts/check_outputs.sh +++ b/.github/scripts/check_outputs.sh @@ -1,15 +1,6 @@ -#!/usr/bin/env bash +#!/bin/bash .github/scripts/check_outputs.py \ --analysis-outdir-upstream .github/data/test_output/KevinKuchinski-FluViewer-output \ --analysis-outdir-origin .github/data/test_output/BCCDC-PHL-FluViewer-output \ --outdir artifacts - -column -ts ',' artifacts/check_outputs_summary.csv - -while read -r test_name test_result; do - if [ "$test_result" == "FAIL" ]; then - echo "Test $test_name failed" - exit 1 - fi -done < tail -n+2 artifacts/check_outputs_summary.csv