From: Martin Pool Date: Thu, 16 Aug 2001 09:08:29 +0000 (+0000) Subject: Start to unify the "make check" and build farm test suites X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/a4772a4dbca5db5082b35882aae7cdbe0dbb8e83 Start to unify the "make check" and build farm test suites --- diff --git a/Makefile.in b/Makefile.in index 56e1b042..15e788eb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/testsuite/README b/testsuite/README index eb0e8e92..55e15a64 100644 --- a/testsuite/README +++ b/testsuite/README @@ -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 index 00000000..3a9c1675 --- /dev/null +++ b/testsuite/master.test @@ -0,0 +1,41 @@ +#! /bin/sh + +# Copyright (C) 2001 by Martin Pool + +# 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 '------------------------------------------------------------' diff --git a/testsuite/rsync-hello.test b/testsuite/rsync-hello.test index 75db77f1..a925668d 100755 --- a/testsuite/rsync-hello.test +++ b/testsuite/rsync-hello.test @@ -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 index 791b62b8..00000000 --- a/testsuite/rsync.fns +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh - -rsync="$prefix/bin/rsync" - diff --git a/testsuite/runlist b/testsuite/runlist index 8d52c28e..b1d3af6f 100755 --- a/testsuite/runlist +++ b/testsuite/runlist @@ -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" +