self.name = name
self.state = None
self.side_effects = []
+ self.builder = None
def has_builder(self):
return 1
def add_pre_action(self, *actions):
pass
def clear(self):
pass
+ def current(self, calc=None):
+ return None
+ def prepare(self):
+ pass
+ def retrieve_from_cache(self):
+ return 0
+ def build(self, **kw):
+ return
+ def built(self):
+ pass
return [MyNode('n1'), MyNode('n2')]
- self.scons_env.Append(BUILDERS = {'SConfActionBuilder' : MyBuilder()})
- sconf.TryBuild(self.scons_env.SConfActionBuilder)
+ try:
+ self.scons_env.Append(BUILDERS = {'SConfActionBuilder' : MyBuilder()})
+ sconf.TryBuild(self.scons_env.SConfActionBuilder)
+ finally:
+ sconf.Finish()
def test_TryCompile(self):
"""Test SConf.TryCompile
import tempfile
filename = tempfile.mktemp()
str = '1234567890 ' + filename
- open(filename, 'w').write(str)
- assert open(get_native_path(filename)).read() == str
+ try:
+ open(filename, 'w').write(str)
+ assert open(get_native_path(filename)).read() == str
+ finally:
+ try:
+ os.unlink(filename)
+ except OSError:
+ pass
def test_subst_dict(self):
"""Test substituting dictionary values in an Action
test.run(status=2, stderr=None)
-test.fail_test(string.find(test.stderr(), "No such file or directory") == -1)
+stderr = test.stderr()
+test.fail_test(string.find(stderr, "No such file or directory") == -1 and
+ string.find(stderr, "The system cannot find the path specified") == -1)
test.pass_test()
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "<WORKPATH>"
# PROP BASE Intermediate_Dir "<WORKPATH>"
-# PROP BASE Cmd_Line "<PYTHON> -c "<SCONS_SCRIPT_MAIN>" -C <WORKPATH> -f SConstruct <WORKPATH>\Test.exe"
-# PROP BASE Rebuild_Opt "-c && <PYTHON> -c "<SCONS_SCRIPT_MAIN>" -C <WORKPATH> -f SConstruct <WORKPATH>\Test.exe"
+# PROP BASE Cmd_Line ""<PYTHON>" -c "<SCONS_SCRIPT_MAIN>" -C <WORKPATH> -f SConstruct <WORKPATH>\Test.exe"
+# PROP BASE Rebuild_Opt "-c && "<PYTHON>" -c "<SCONS_SCRIPT_MAIN>" -C <WORKPATH> -f SConstruct <WORKPATH>\Test.exe"
# PROP BASE Target_File "<WORKPATH>\Test.exe"
# PROP BASE Bsc_Name ""
# PROP BASE Target_Dir ""
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "<WORKPATH>"
# PROP Intermediate_Dir "<WORKPATH>"
-# PROP Cmd_Line "<PYTHON> -c "<SCONS_SCRIPT_MAIN>" -C <WORKPATH> -f SConstruct <WORKPATH>\Test.exe"
-# PROP Rebuild_Opt "-c && <PYTHON> -c "<SCONS_SCRIPT_MAIN>" -C <WORKPATH> -f SConstruct <WORKPATH>\Test.exe"
+# PROP Cmd_Line ""<PYTHON>" -c "<SCONS_SCRIPT_MAIN>" -C <WORKPATH> -f SConstruct <WORKPATH>\Test.exe"
+# PROP Rebuild_Opt "-c && "<PYTHON>" -c "<SCONS_SCRIPT_MAIN>" -C <WORKPATH> -f SConstruct <WORKPATH>\Test.exe"
# PROP Target_File "<WORKPATH>\Test.exe"
# PROP Bsc_Name ""
# PROP Target_Dir ""