I goofed.
This commit replaces the use of "print" with "printf" in awk to avoid a newline in the value of $xfcount, and replaces ">", which creates the spurious file, with "-gt" in the comparison.
From: Francisco Casas fcasas@codeweavers.com
We use "printf" instead of "print" in awk in order to avoid a newline in the value of $xfcount, and use "-gt" instead of ">", which creates the spurious file, in the comparison.
---
I goofed. --- tests/test-driver.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test-driver.sh b/tests/test-driver.sh index 39a3e4270..221a963e5 100755 --- a/tests/test-driver.sh +++ b/tests/test-driver.sh @@ -183,7 +183,7 @@ EOF details=$(awk "$awk_program" "$log_file")
# Count number of [XF] tags. -xfcount=$(echo "$details" | awk '/[XF]/{count++} END{print count}') +xfcount=$(echo "$details" | awk '/[XF]/{count++} END{printf "%d", count}')
details=$(echo "$details" |\ sed "s/[F]/$color_bright_red[F]$color_reset/g" |\ @@ -197,7 +197,7 @@ details=$(echo "$details" |\ awk 'NF != 1' )
# If the test passes but has [XF], we will omit details but report number of [XF] -if [ "$res" = "PASS" ] && [ $xfcount > 0 ]; then +if [ "$res" = "PASS" ] && [ "$xfcount" -gt 0 ]; then details="$color_yellow($xfcount XF)$color_reset" fi
This merge request was approved by Henri Verbeet.