From 676f6fab114a13517c6693be0a907553e6464001 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Fri, 25 May 2018 10:20:48 -0400 Subject: [PATCH] Improve debug output when 'make test' fails If 'make test' fails before running any tests, the debug output from print-failed-test-output is confusing: + ./print-failed-test-output cat: t/test-results/*.exit: No such file or directory ./print-failed-test-output: line 6: [: : integer expression expected -------------------------------------------------------------------------------- t/test-results/*.out -------------------------------------------------------------------------------- cat: t/test-results/*.out: No such file or directory Use the bash failglob option to imrpve the output: + ./print-failed-test-output ./print-failed-test-output: line 12: no match: t/test-results/*.exit --- print-failed-test-output | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/print-failed-test-output b/print-failed-test-output index f095b86..68fa9ee 100644 --- a/print-failed-test-output +++ b/print-failed-test-output @@ -1,4 +1,6 @@ -#!/bin/sh +#!/bin/bash + +shopt -s failglob # Print output from failing tests dashes=$(printf "%80s" '' | tr ' ' '-')