summaryrefslogtreecommitdiffstats
path: root/etc/TestSCons.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-01-22 13:51:44 (GMT)
committerSteven Knight <knight@baldmt.com>2003-01-22 13:51:44 (GMT)
commit301dbb53e3aa320ef6b8e635257a2acee1409f9c (patch)
tree404d6bacfc5573bc197806f73597765102d5497b /etc/TestSCons.py
parentd09c74cccc89c9d58382ad7dcae6def5499da113 (diff)
downloadSCons-301dbb53e3aa320ef6b8e635257a2acee1409f9c.zip
SCons-301dbb53e3aa320ef6b8e635257a2acee1409f9c.tar.gz
SCons-301dbb53e3aa320ef6b8e635257a2acee1409f9c.tar.bz2
Add support for the PharLap ETS tools. (Charles Crain)
Diffstat (limited to 'etc/TestSCons.py')
-rw-r--r--etc/TestSCons.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/etc/TestSCons.py b/etc/TestSCons.py
index 658496b..e8bac90 100644
--- a/etc/TestSCons.py
+++ b/etc/TestSCons.py
@@ -167,6 +167,26 @@ class TestSCons(TestCmd.TestCmd):
except KeyError:
return None
+ def detect_tool(self, tool, prog=None):
+ """
+ Given a tool (i.e., tool specification that would be passed
+ to the "tools=" parameter of Environment()) and one a program that
+ corresponds to that tool, return true if and only if we can find
+ that tool using Environment.Detect().
+
+ By default, progs is set to the value passed into the tools parameter.
+ """
+
+ if not prog:
+ prog = tool
+ import SCons.Environment
+ import SCons.Errors
+ try:
+ env=SCons.Environment.Environment(tools=[tool])
+ except (SCons.Errors.UserError, SCons.Errors.InternalError):
+ return None
+ return env.Detect([prog])
+
def wrap_stdout(self, build_str = "", read_str = ""):
"""Wraps standard output string(s) in the normal
"Reading ... done" and "Building ... done" strings