Mercurial > hg > mercurial-crew-with-dirclash
comparison tests/run-tests @ 1279:8ab1c07d4e0b
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.
author | eric@localhost.localdomain |
---|---|
date | Mon, 19 Sep 2005 18:24:37 -0700 |
parents | 5a034646e472 |
children | 2073e5a71008 |
comparison
equal
deleted
inserted
replaced
1278:6a0d373d3126 | 1279:8ab1c07d4e0b |
---|---|
102 rm -f "$HGTMP/$1.out" | 102 rm -f "$HGTMP/$1.out" |
103 rm -rf "$HGTMP/$1" | 103 rm -rf "$HGTMP/$1" |
104 return $fail | 104 return $fail |
105 } | 105 } |
106 | 106 |
107 # list of prerequisite programs | |
108 # stuff from coreutils (cat, rm, etc) are not tested | |
109 prereqs="python merge diff grep unzip md5sum gunzip sed" | |
110 missing='' | |
111 for pre in $prereqs ; do | |
112 if type $pre > /dev/null 2>&1 ; then | |
113 : prereq exists | |
114 else | |
115 missing="$pre $missing" | |
116 fi | |
117 done | |
118 | |
119 if [ "$missing" != '' ] ; then | |
120 echo "ERROR: the test suite needs some programs to execute correctly." | |
121 echo "The following programs are missing: " | |
122 for pre in $missing; do | |
123 echo " $pre" | |
124 done | |
125 exit 1 | |
126 fi | |
127 | |
107 TESTS="$*" | 128 TESTS="$*" |
108 if [ -z "$TESTS" ] ; then | 129 if [ -z "$TESTS" ] ; then |
109 TESTS=`ls test-* | grep -v "[.~]"` | 130 TESTS=`ls test-* | grep -v "[.~]"` |
110 fi | 131 fi |
111 | 132 |