[PATCH] check test suite prerequisites
ergosys at gmail.com
Mon Sep 19 19:46:24 CDT 2005
# HG changeset patch
# User eric at localhost.localdomain
# Node ID 82337b44e5e8652cb22fd1af4b979da9a9455a9a
# Parent 0bf11906df28adb3bdc700cf2f1ff81580ae1b2b
Add checks for programs which are required for the test suite to run.
All prerequisite programs are checked for existance, and if any are
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,
diff -r 0bf11906df28 -r 82337b44e5e8 tests/run-tests
--- a/tests/run-tests Mon Sep 19 20:15:36 2005
+++ b/tests/run-tests Tue Sep 20 00:19:29 2005
@@ -104,6 +104,27 @@
+# list of prerequisite programs
+# stuff from coreutils (cat, rm, etc) are not tested
+prereqs="python merge diff grep unzip md5sum gunzip sed"
+for pre in $prereqs ; do
+ if type $pre > /dev/null 2>&1 ; then
+ : prereq exists
+ missing="$pre $missing"
+if [ "$missing" != '' ] ; then
+ echo "ERROR: the test suite needs some programs to execute
+ echo "The following programs are missing: "
+ for pre in $missing; do
+ echo " $pre"
+ exit 1
if [ -z "$TESTS" ] ; then
TESTS=`ls test-* | grep -v "[.~]"`
More information about the Mercurial