File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2+ set -e
23
34export TB_VERSION_WARNING=0
45export VERSION=$1
@@ -8,19 +9,27 @@ run_test() {
89 echo " ** Running $t **"
910 # Check if VERSION is provided
1011 if [[ -n $VERSION ]]; then
11- echo " VERSION found: $VERSION "
1212 sed -i " s/tb/tb --semver $VERSION /" $t
13- else
14- echo " VERSION not found"
1513 fi
1614 echo " ** $( cat $t ) "
17- if res=$( bash $t $2 | diff -B ${t} .result -) ; then
18- echo ' OK' ;
15+ tmpfile=$( mktemp)
16+ if bash $t $2 > $tmpfile ; then
17+ if diff -B ${t} .result $tmpfile ; then
18+ echo " Test $t : OK" ;
19+ else
20+ echo " 🚨 ERROR: Test $t failed, diff:" ;
21+ diff -B ${t} .result $tmpfile
22+ cat $tmpfile
23+ rm $tmpfile
24+ return 1
25+ fi
1926 else
20- echo " failed, diff:" ;
21- echo " $res " ;
27+ echo " 🚨 ERROR: Test $t failed with bash command exit code $? "
28+ cat $tmpfile
29+ rm $tmpfile
2230 return 1
2331 fi
32+ rm $tmpfile
2433 echo " "
2534}
2635export -f run_test
You can’t perform that action at this time.
0 commit comments