From e6a9832747f6c52442e24e3f63a8a55b68d3d016 Mon Sep 17 00:00:00 2001 From: bluhm Date: Fri, 28 Apr 2023 19:41:07 +0000 Subject: [PATCH] Execute each test as make target. Remove the shell wrapper. Mark failing test so that claudio@ can fix them. --- regress/usr.bin/rsync/Makefile | 27 ++++++++++++++++++++++++--- regress/usr.bin/rsync/runtests.sh | 11 ----------- 2 files changed, 24 insertions(+), 14 deletions(-) delete mode 100644 regress/usr.bin/rsync/runtests.sh diff --git a/regress/usr.bin/rsync/Makefile b/regress/usr.bin/rsync/Makefile index 13331159ecc..78317370a1d 100644 --- a/regress/usr.bin/rsync/Makefile +++ b/regress/usr.bin/rsync/Makefile @@ -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 diff --git a/regress/usr.bin/rsync/runtests.sh b/regress/usr.bin/rsync/runtests.sh deleted file mode 100644 index 190a9f09ea8..00000000000 --- a/regress/usr.bin/rsync/runtests.sh +++ /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 -- 2.20.1