diff --git a/tests/run-tests b/tests/run-tests --- a/tests/run-tests +++ b/tests/run-tests @@ -104,6 +104,27 @@ run_one() { return $fail } +# list of prerequisite programs +# stuff from coreutils (cat, rm, etc) are not tested +prereqs="python merge diff grep unzip md5sum gunzip sed" +missing='' +for pre in $prereqs ; do + if type $pre > /dev/null 2>&1 ; then + : prereq exists + else + missing="$pre $missing" + fi +done + +if [ "$missing" != '' ] ; then + echo "ERROR: the test suite needs some programs to execute correctly." + echo "The following programs are missing: " + for pre in $missing; do + echo " $pre" + done + exit 1 +fi + TESTS="$*" if [ -z "$TESTS" ] ; then TESTS=`ls test-* | grep -v "[.~]"`