diff options
author | Steven Knight <knight@baldmt.com> | 2003-01-22 13:51:44 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-01-22 13:51:44 (GMT) |
commit | 301dbb53e3aa320ef6b8e635257a2acee1409f9c (patch) | |
tree | 404d6bacfc5573bc197806f73597765102d5497b /etc/TestSCons.py | |
parent | d09c74cccc89c9d58382ad7dcae6def5499da113 (diff) | |
download | SCons-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.py | 20 |
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 |