Module: vkd3d Branch: master Commit: b831ffe96c3e546fc9038c9308862d07b9aa267c URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/b831ffe96c3e546fc9038c9308862d...
Author: Francisco Casas fcasas@codeweavers.com Date: Mon Mar 11 22:02:30 2024 -0300
tests: Avoid creating a file named "0" when calling "make check".
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.
---
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 39a3e427..221a963e 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