summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/RANLIB.py10
-rw-r--r--test/RANLIBFLAGS.py9
2 files changed, 19 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
diff --git a/test/RANLIBFLAGS.py b/test/RANLIBFLAGS.py
index 1855af2..5549e94 100644
--- a/test/RANLIBFLAGS.py
+++ b/test/RANLIBFLAGS.py
@@ -36,8 +36,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