]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Add strict (no-skipping) checks and use them.
authorWayne Davison <wayne@opencoder.net>
Fri, 17 Jul 2020 18:18:35 +0000 (11:18 -0700)
committerWayne Davison <wayne@opencoder.net>
Fri, 17 Jul 2020 18:20:04 +0000 (11:20 -0700)
.github/workflows/build.yml
Makefile.in
packaging/auto-Makefile
runtests.sh

index 44f9f72cd8705b6511f11e9db6e8998482bfe306..182fa6c91be99a137552ddf9ed6b1cd7bc4ccff6 100644 (file)
@@ -27,11 +27,11 @@ jobs:
     - name: info
       run: rsync --version
     - name: check
-      run: sudo make check
+      run: sudo make strict_check
     - name: check30
-      run: sudo make check30
+      run: sudo make strict_check30
     - name: check29
-      run: sudo make check29
+      run: sudo make strict_check29
     - name: ssl file list
       run: rsync-ssl --no-motd download.samba.org::rsyncftp/ || true
 
index 0f17aa163ebf7dde7622338d490c43b730854caa..07479ca255d43ce41fdd6a3cae17b9ac4afc7ea6 100644 (file)
@@ -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
-check: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
-       rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh
+.PHONY: check strict_check
+check strict_check: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
+       rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh $@
 
-.PHONY: check29
-check29: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
-       rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh --protocol=29
+.PHONY: check29 strict_check29
+check29 strict_check29: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
+       rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh $@ --protocol=29
 
-.PHONY: check30
-check30: all $(CHECK_PROGS) $(CHECK_SYMLINKS)
-       rsync_bin=`pwd`/rsync$(EXEEXT) $(srcdir)/runtests.sh --protocol=30
+.PHONY: check30 strict_check30
+check30 strict_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@
index cc181536ef9ffe693ff1a6539a41b345364260a8..5e3322a2026e2d79a0e502b35e1fe1794cbce50a 100644 (file)
@@ -1,5 +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 installcheck splint doxygen doxygen-upload
+       proto man clean cleantests distclean test check check29 check30 strict_check strict_check29 strict_check30 \
+       installcheck splint doxygen doxygen-upload
 
 .PHONY: $(TARGETS) auto-prep
 
index d5a174cbba8164bc704a4e0b64e2a5a876f02960..518ee495a4871e8a44259a1dbd032b511d38d004 100755 (executable)
@@ -162,6 +162,13 @@ 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 $*"
@@ -338,6 +345,10 @@ echo '------------------------------------------------------------'
 # we want, and if we just call expr then this script will always fail,
 # because -e is set.
 
-result=`expr $failed + $missing || true`
+if test -z "$RSYNC_FAIL_ON_SKIPPED"; then
+    result=`expr $failed + $missing || true`
+else
+    result=`expr $failed + $missing + $skipped || true`
+fi
 echo "overall result is $result"
 exit $result