]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Start to unify the "make check" and build farm test suites
authorMartin Pool <mbp@samba.org>
Thu, 16 Aug 2001 09:08:29 +0000 (09:08 +0000)
committerMartin Pool <mbp@samba.org>
Thu, 16 Aug 2001 09:08:29 +0000 (09:08 +0000)
Makefile.in
testsuite/README
testsuite/master.test [new file with mode: 0755]
testsuite/rsync-hello.test
testsuite/rsync.fns [deleted file]
testsuite/runlist

index 56e1b0427bfca6c012228aa4af97e162f935c3ff..15e788ebb8023b8951354312993d7000969d0502 100644 (file)
@@ -86,3 +86,11 @@ finddead:
        nm *.o */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
        nm *.o */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
        comm -13 nmused.txt nmfns.txt 
+
+# 'check' is the GNU name, 'test' is the name for everybody else :-)
+.PHONY: check test
+
+test: check
+
+check:
+       rsync_bin=`pwd`/rsync testdir=$(srcdir)/testsuite $(srcdir)/testsuite/master.test
index eb0e8e92ac9723637f8dd5bad970813e4a4db9c4..55e15a64ff7c0e4773b8c26332595f0920b49f3e 100644 (file)
@@ -5,6 +5,3 @@ top-level source directory.  (Not implemented yet.)
 They also run automatically on the build farm, and you can see the
 results on http://build.samba.org/.  That's controlled by the file
 ./runlist.
-
-TEST_ALL="rsync-hello"
-
diff --git a/testsuite/master.test b/testsuite/master.test
new file mode 100755 (executable)
index 0000000..3a9c167
--- /dev/null
@@ -0,0 +1,41 @@
+#! /bin/sh
+
+# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
+
+# rsync top-level test script -- this invokes all the other more
+# detailed tests in order.  This script can either be called by 'make
+# check' or through 'runlist' from the build farm.
+
+# We need a few environment variables to know what to test.
+
+echo "============================================================"
+echo "$0 running"
+
+test_names="rsync-hello"
+
+export rsync_bin
+export testdir
+
+cd "$testdir"
+
+for testbase in $test_names
+do
+    echo "------------------------------------------------------------"
+    echo "----- $testbase running"
+
+    testscript="$testbase.test"
+    if test \! -f "$testscript" 
+    then
+       echo "$testscript does not exist" >&2
+       continue
+    fi
+
+    if sh $testscript
+    then
+       echo "----- $testbase completed succesfully"
+    else
+       echo "----- $testbase failed!"
+    fi 
+done
+
+echo '------------------------------------------------------------'
index 75db77f17390c2e0651b4198105d213fefc9f955..a925668d8abcb7d2cb9c0d0d3816b673da139b09 100755 (executable)
@@ -1,7 +1,3 @@
 #! /bin/sh
 
-set -x
-
-. rsync.fns
-
-"$rsync" --version || exit 1
+"$rsync_bin" --version || exit 1
diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
deleted file mode 100644 (file)
index 791b62b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/sh
-
-rsync="$prefix/bin/rsync"
-
index 8d52c28ec27af28cffcf34a10a8a93213691868f..b1d3af6f0ce8b14e77d58990658e6545e63da3c2 100755 (executable)
@@ -6,4 +6,12 @@
 
 echo "$0 running" 
 
-TEST_ALL="rsync-hello"
+TEST_ALL="master"
+
+# Also, we need a little bit of special set up when running from the
+# build farm.
+
+# It's already been installed in a scratch copy of /usr.
+
+rsync_bin="$prefix/bin/rsync"
+