--- /cygdrive/l/devel/test/testdistcc.py	2006-01-13 14:04:09.000000000 +0100
+++ test/testdistcc.py	2006-01-13 17:25:58.000000000 +0100
@@ -20,7 +20,14 @@
 """distcc test suite, using comfychair
 
 This script is called with $PATH pointing to the appropriate location
-for the built (or installed) programs to be tested.
+for the built (or installed) programs to be tested. It must include
+the directory to the newly built programs and the helper executables
+like h_hosts.
+
+$CC is the name of the compiler to be tested, e.g gcc-3.4, default ist gcc.
+
+To run a single testcase, use
+PATH=`pwd`:/usr/local/bin:/bin:/usr/bin python2.4 ./test/testdistcc.py  CompileHello_Case
 """
 
 
@@ -1156,13 +1163,21 @@
         CompileHello_Case.teardown(self)
 
 
-# When invoking compiler, use absolute path so distccd can find it
-for path in os.environ['PATH'].split (':'):
-    abs_path = os.path.join (path, 'gcc')
+if 'CC' in os.environ.keys():
+    _gcc_name = os.environ['CC']
+else:
+    _gcc_name = 'gcc'
 
-    if os.path.isfile (abs_path):
-        _gcc = abs_path
-        break
+for path in os.environ['PATH'].split (':'):
+    abs_path = os.path.join (path, _gcc_name)
+ 
+    if os.path.isfile(abs_path):
+         _gcc = abs_path
+         break
+ 
+if not _gcc:
+    print "Could not find %s in PATH" % _gcc_name 
+    os._exit(2)
 
 # All the tests defined in this suite
 tests = [BadLogFile_Case,
