diff options
author | Steven Knight <knight@baldmt.com> | 2002-03-07 23:18:02 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-03-07 23:18:02 (GMT) |
commit | 232ea1169c24b803d0c90e3cdb277e356b2eb087 (patch) | |
tree | f279952eadcc1ee93bfcb87e2e7f25bcd149151d /test/RANLIB.py | |
parent | 71a1c2b9715bd3b41f85f28df31c424de4534679 (diff) | |
download | SCons-232ea1169c24b803d0c90e3cdb277e356b2eb087.zip SCons-232ea1169c24b803d0c90e3cdb277e356b2eb087.tar.gz SCons-232ea1169c24b803d0c90e3cdb277e356b2eb087.tar.bz2 |
Fix RANLIB tests for systems that don't have ranlib. (Charles Crain.)
Diffstat (limited to 'test/RANLIB.py')
-rw-r--r-- | test/RANLIB.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/RANLIB.py b/test/RANLIB.py index 2e151cd..d255b7a 100644 --- a/test/RANLIB.py +++ b/test/RANLIB.py @@ -25,6 +25,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os +import os.path import string import sys import TestSCons @@ -36,8 +37,17 @@ if sys.platform == 'win32': else: _exe = '' +ranlib = None +for dir in string.split(os.environ['PATH'], os.pathsep): + r = os.path.join(dir, 'ranlib' + _exe) + if os.path.exists(r): + ranlib = r + break + test = TestSCons.TestSCons() +test.no_result(not ranlib) + test.write("wrapper.py", """import os import string |