5 # Permission is hereby granted, free of charge, to any person obtaining
6 # a copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish,
9 # distribute, sublicense, and/or sell copies of the Software, and to
10 # permit persons to whom the Software is furnished to do so, subject to
11 # the following conditions:
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
17 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
18 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
28 Verify that we don't throw an exception if a stored implicit
29 dependency has changed
34 test = TestSCons.TestSCons()
43 test.write('SConstruct', """\
44 SetOption('implicit_cache', 1)
45 SetOption('max_drift', 1)
48 def lister(target, source, env):
50 fp = open(str(target[0]), 'w')
53 for l in os.listdir(str(source[0])):
59 builder = Builder(action=lister,
61 source_scanner=DirScanner)
62 env = Environment(tools=[])
63 env['BUILDERS']['builder'] = builder
64 env.builder('d/xfactor', 'd/1')
68 test.write(['d', '1', 'x'], "d/1/x\n")
69 test.write(['d', '1', 'y'], "d/1/y\n")
70 test.write(['d', '1', 'z'], "d/1/z\n")
71 test.write(['d', '2', 'x'], "d/2/x\n")
72 test.write(['d', '2', 'y'], "d/2/y\n")
73 test.write(['d', '2', 'z'], "d/2/x\n")
74 test.write(['d', '3', 'x'], "d/3/x\n")
75 test.write(['d', '3', 'y'], "d/3/y\n")
76 test.write(['d', '3', 'z'], "d/3/z\n")
78 test.run('--debug=stacktrace')
82 test.write('SConstruct', """\
83 SetOption('implicit_cache', 1)
84 SetOption('max_drift', 1)
87 def lister(target, source, env):
89 fp = open(str(target[0]), 'w')
92 for l in os.listdir(str(source[0])):
98 builder = Builder(action=lister,
100 env = Environment(tools=[])
101 env['BUILDERS']['builder'] = builder
103 env.builder('a', 'SConstruct')
106 test.run('--debug=stacktrace')
113 #from os import system, rmdir, remove, mkdir, listdir
114 #from os.path import exists, isdir
118 #def setfile(f, content):
120 # try: f.write(content)
123 #def checkfile(f, content):
124 # assert open(f).read().strip() == content
129 # for name in listdir(f):
134 # for f in ('d','b','a','SConstruct'):
137 # for f in ('.sconsign.dblite', 'build.py'):