From 8779d6c8bb23c643c805fc9aaa5873ee64a98cd7 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 22 Jul 2020 10:59:15 -0700 Subject: [PATCH] Switch to RSYNC_MAX_SKIPPED test setting. --- .github/workflows/build.yml | 6 +++--- Makefile.in | 18 +++++++++--------- packaging/auto-Makefile | 4 ++-- runtests.sh | 14 +++----------- 4 files changed, 17 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 812171dc..8f52f251 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,11 +27,11 @@ jobs: - name: info run: rsync --version - name: check - run: sudo make strict_check + run: sudo RSYNC_MAX_SKIPPED=0 make check - name: check30 - run: sudo make strict_check30 + run: sudo RSYNC_MAX_SKIPPED=0 make check30 - name: check29 - run: sudo make strict_check29 + run: sudo RSYNC_MAX_SKIPPED=0 make check29 - name: ssl file list run: rsync-ssl --no-motd download.samba.org::rsyncftp/ || true - name: save artifact diff --git a/Makefile.in b/Makefile.in index 513b2f8c..a6ce0366 100644 --- a/Makefile.in +++ b/Makefile.in @@ -295,17 +295,17 @@ test: check # catch Bash-isms earlier even if we're running on GNU. Of course, we # might lose in the future where POSIX diverges from old sh. -.PHONY: check strict_check -check strict_check: all $(CHECK_PROGS) $(CHECK_SYMLINKS) - rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh $@ +.PHONY: check +check: all $(CHECK_PROGS) $(CHECK_SYMLINKS) + rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh -.PHONY: check29 strict_check29 -check29 strict_check29: all $(CHECK_PROGS) $(CHECK_SYMLINKS) - rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh $@ --protocol=29 +.PHONY: check29 +check29: all $(CHECK_PROGS) $(CHECK_SYMLINKS) + rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh --protocol=29 -.PHONY: check30 strict_check30 -check30 strict_check30: all $(CHECK_PROGS) $(CHECK_SYMLINKS) - rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh $@ --protocol=30 +.PHONY: check30 +check30: all $(CHECK_PROGS) $(CHECK_SYMLINKS) + rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh --protocol=30 wildtest.o: wildtest.c t_stub.o lib/wildmatch.c rsync.h config.h wildtest$(EXEEXT): wildtest.o lib/compat.o lib/snprintf.o @BUILD_POPT@ diff --git a/packaging/auto-Makefile b/packaging/auto-Makefile index 5e3322a2..e50277cb 100644 --- a/packaging/auto-Makefile +++ b/packaging/auto-Makefile @@ -1,6 +1,6 @@ TARGETS := all install install-ssl-daemon install-all install-strip conf gen gensend reconfigure restatus \ - proto man clean cleantests distclean test check check29 check30 strict_check strict_check29 strict_check30 \ - installcheck splint doxygen doxygen-upload + proto man clean cleantests distclean test check check29 check30 installcheck splint \ + doxygen doxygen-upload .PHONY: $(TARGETS) auto-prep diff --git a/runtests.sh b/runtests.sh index 518ee495..ecb383e8 100755 --- a/runtests.sh +++ b/runtests.sh @@ -162,13 +162,6 @@ if test x"$rsync_bin" = x; then rsync_bin="$TOOLDIR/rsync" fi -if test $# -ge 1; then - case "$1" in - strict*) RSYNC_FAIL_ON_SKIPPED=yes ; shift ;; - check*) shift ;; - esac -fi - # This allows the user to specify extra rsync options -- use carefully! RSYNC="$rsync_bin $*" #RSYNC="valgrind $rsync_bin $*" @@ -345,10 +338,9 @@ echo '------------------------------------------------------------' # we want, and if we just call expr then this script will always fail, # because -e is set. -if test -z "$RSYNC_FAIL_ON_SKIPPED"; then - result=`expr $failed + $missing || true` -else - result=`expr $failed + $missing + $skipped || true` +result=`expr $failed + $missing || true` +if [ "$result" = 0 -a "$skipped" -gt "${RSYNC_MAX_SKIPPED:-9999}" ]; then + result=1 fi echo "overall result is $result" exit $result -- 2.47.2