[master] 8df29b6b6 Make vtest work with non-vtc test-fails

Poul-Henning Kamp phk at FreeBSD.org
Tue Dec 5 08:41:05 UTC 2023


commit 8df29b6b6145d9484c92bf961ee769093c8fe90f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Dec 5 08:40:21 2023 +0000

    Make vtest work with non-vtc test-fails

diff --git a/tools/vtest.sh b/tools/vtest.sh
index bf6c37a8a..1d82f65a3 100755
--- a/tools/vtest.sh
+++ b/tools/vtest.sh
@@ -194,10 +194,14 @@ failedtests () (
 	while read trs
 	do
 		name=`basename "${trs}" .trs`
-		vtc=`echo $trs | sed -e 's/trs$/vtc/' -e 's/.*_build\/\(sub\/\)\?//'`
+		vtc=`echo $trs | sed -E -e 's/trs$/vtc/' -e 's/.*_build\/(sub\/)?//'`
 		logfile=`echo $trs | sed -e 's/trs$/log/'`
 		log="${name}.log"
-		rev=`git log -n 1 --pretty=format:%H "${vtc}"`
+		if [ -f ${vtc} ] ; then
+			rev=`git log -n 1 --pretty=format:%H "${vtc}"`
+		else
+			rev="?"
+		fi
 		cp "${logfile}" "${REPORTDIR}/_${log}"
 		echo "VTCGITREV ${name} ${rev}"
 		echo "MANIFEST _${log}"


More information about the varnish-commit mailing list