Execute each test as make target. Remove the shell wrapper. Mark
authorbluhm <bluhm@openbsd.org>
Fri, 28 Apr 2023 19:41:07 +0000 (19:41 +0000)
committerbluhm <bluhm@openbsd.org>
Fri, 28 Apr 2023 19:41:07 +0000 (19:41 +0000)
failing test so that claudio@ can fix them.

regress/usr.bin/rsync/Makefile
regress/usr.bin/rsync/runtests.sh [deleted file]

index 1333115..7831737 100644 (file)
@@ -1,6 +1,27 @@
-# $OpenBSD: Makefile,v 1.1 2023/04/28 16:28:28 claudio Exp $
+# $OpenBSD: Makefile,v 1.2 2023/04/28 19:41:07 bluhm Exp $
 
-regress:
-       sh ${.CURDIR}/runtests.sh ${.CURDIR}
+# evaluate once in main make invocation, pass test list in environment
+.if ! (make(clean) || make(cleandir) || make(obj))
+RSYNC_TESTS ?!=        ls -1 ${.CURDIR}/*.test
+.MAKEFLAGS :=  RSYNC_TESTS="${RSYNC_TESTS}"
+.endif
+
+clean:
+       rm -rf dir* find*
+
+# these fail permanently and should be investigated
+REGRESS_EXPECTED_FAILURES =    run-test11_middlediff \
+                               run-test11b_middlediff \
+                               run-test3_minusexclude \
+                               run-test7_symlinks
+# these fail randomly with Permission denied
+#                              run-test6_perms
+#                              run-test6b_perms
+
+.for t in ${RSYNC_TESTS:T:R}
+REGRESS_TARGETS +=     run-$t
+run-$t:
+       tstdir=${.CURDIR} sh ${.CURDIR}/$t.test
+.endfor
 
 .include <bsd.regress.mk>
diff --git a/regress/usr.bin/rsync/runtests.sh b/regress/usr.bin/rsync/runtests.sh
deleted file mode 100644 (file)
index 190a9f0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-for i in ${1}/*.test; do
-       echo $(basename ${i})
-       tstdir=${1} sh ${i}
-       if [ "$?" -eq "0" ]; then
-               echo OK
-       else
-               echo FAIL
-       fi
-done