# HG changeset patch # User eric@localhost.localdomain # Date 1127179477 25200 # Node ID 8ab1c07d4e0bbc29c1c028e953fc691fa4654eb8 # Parent 6a0d373d3126620f984b10d4b5d599cee5c5cab0 Add checks for programs which are required for the test suite to run. All prerequisite programs are checked for existance, and if any are missing, a list of missing programs is printed, and the test suite is aborted. All programs currently used in the tests, except those in core-utils, are checked. diff -r 6a0d373d3126 -r 8ab1c07d4e0b tests/run-tests --- a/tests/run-tests Mon Sep 19 15:59:17 2005 -0700 +++ b/tests/run-tests Mon Sep 19 18:24:37 2005 -0700 @@ -104,6 +104,27 @@ 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 "[.~]"`