summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/engine/SCons/Node/Python.py1
-rw-r--r--src/engine/SCons/Node/__init__.py4
-rw-r--r--test/CacheDir/value.py47
-rw-r--r--test/fixture/cachedir_foo_value/SConstruct19
-rw-r--r--test/fixture/cachedir_foo_value/foo.c1
5 files changed, 69 insertions, 3 deletions
diff --git a/src/engine/SCons/Node/Python.py b/src/engine/SCons/Node/Python.py
index 546769d..83e38f0 100644
--- a/src/engine/SCons/Node/Python.py
+++ b/src/engine/SCons/Node/Python.py
@@ -152,7 +152,6 @@ class Value(SCons.Node.Node):
# Already encoded as python2 str are bytes
return text_contents
-
def changed_since_last_build(self, target, prev_ni):
cur_csig = self.get_csig()
try:
diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py
index daf79ba..4200965 100644
--- a/src/engine/SCons/Node/__init__.py
+++ b/src/engine/SCons/Node/__init__.py
@@ -741,12 +741,12 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
if self.depends is not None:
for d in self.depends:
if d.missing():
- msg = "Explicit dependency `%s' not found, needed by target `%s'."
+ msg = "Explicit dependency '%s' not found, needed by target '%s'."
raise SCons.Errors.StopError(msg % (d, self))
if self.implicit is not None:
for i in self.implicit:
if i.missing():
- msg = "Implicit dependency `%s' not found, needed by target `%s'."
+ msg = "Implicit dependency '%s' not found, needed by target '%s'."
raise SCons.Errors.StopError(msg % (i, self))
self.binfo = self.get_binfo()
diff --git a/test/CacheDir/value.py b/test/CacheDir/value.py
new file mode 100644
index 0000000..fd89a9e
--- /dev/null
+++ b/test/CacheDir/value.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Verify that bwuilds with caching work for an action with a Value as a child.
+"""
+
+import TestSCons
+
+test = TestSCons.TestSCons()
+
+test.dir_fixture('cachedir_foo_value')
+test.subdir('cache')
+
+# First build, populates the cache
+test.run(arguments='.')
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/fixture/cachedir_foo_value/SConstruct b/test/fixture/cachedir_foo_value/SConstruct
new file mode 100644
index 0000000..b144799
--- /dev/null
+++ b/test/fixture/cachedir_foo_value/SConstruct
@@ -0,0 +1,19 @@
+import SCons.Node
+
+CacheDir('cache')
+
+def b(target, source, env):
+ with open(target[0].abspath, 'w') as f:
+ pass
+
+def scan(node, env, path):
+ return [env.Value('a')]
+
+scanner = Scanner(function=scan, node_class=SCons.Node.Node)
+builder = Builder(action=b, source_scanner=scanner)
+
+env = Environment()
+env.Append(BUILDERS={'B': builder})
+
+env.B(target='File1.out', source='foo.c')
+#env.Program('foo', foo_c)
diff --git a/test/fixture/cachedir_foo_value/foo.c b/test/fixture/cachedir_foo_value/foo.c
new file mode 100644
index 0000000..5ab8d0f
--- /dev/null
+++ b/test/fixture/cachedir_foo_value/foo.c
@@ -0,0 +1 @@
+int main(void){ return 0; }