diff options
author | Russel Winder <russel@winder.org.uk> | 2017-06-20 18:52:32 (GMT) |
---|---|---|
committer | Russel Winder <russel@winder.org.uk> | 2017-06-20 18:52:32 (GMT) |
commit | 101e9c489f35cd2c1aa92121faf0d8e8d54cc080 (patch) | |
tree | 64c754aae02b51521040b352ba2a94b4d2954d34 /test | |
parent | f682d3b5d89b2a37d8743966206a6da303812528 (diff) | |
parent | 8058b1600eff989c685ed5dbc660133f3c8ddf08 (diff) | |
download | SCons-101e9c489f35cd2c1aa92121faf0d8e8d54cc080.zip SCons-101e9c489f35cd2c1aa92121faf0d8e8d54cc080.tar.gz SCons-101e9c489f35cd2c1aa92121faf0d8e8d54cc080.tar.bz2 |
Merge in mainline.
Diffstat (limited to 'test')
18 files changed, 94 insertions, 0 deletions
diff --git a/test/toolpath/nested/image/SConstruct b/test/toolpath/nested/image/SConstruct new file mode 100644 index 0000000..284f21c --- /dev/null +++ b/test/toolpath/nested/image/SConstruct @@ -0,0 +1,15 @@ +# Test where tools are located under site_scons/site_tools
+env1 = Environment(tools=['subdir1.Site_TestTool1', 'subdir1.subdir2.Site_TestTool2', 'subdir1.Site_TestTool3'])
+print("env1['Site_TestTool1'] =", env1.get('Site_TestTool1'))
+print("env1['Site_TestTool2'] =", env1.get('Site_TestTool2'))
+print("env1['Site_TestTool3'] =", env1.get('Site_TestTool3'))
+
+# Test where toolpath is set in the env constructor
+env2 = Environment(tools=['subdir1.Toolpath_TestTool1', 'subdir1.subdir2.Toolpath_TestTool2', 'subdir1.Toolpath_TestTool3'], toolpath=['tools'])
+print("env2['Toolpath_TestTool1'] =", env2.get('Toolpath_TestTool1'))
+print("env2['Toolpath_TestTool2'] =", env2.get('Toolpath_TestTool2'))
+print("env2['Toolpath_TestTool3'] =", env2.get('Toolpath_TestTool3'))
+
+base = Environment(tools=[], toolpath=['tools'])
+derived = base.Clone(tools=['subdir1.Toolpath_TestTool1'])
+print("derived['Toolpath_TestTool1'] =", derived.get('Toolpath_TestTool1'))
diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool1.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool1.py new file mode 100644 index 0000000..d4a19a8 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool1.py @@ -0,0 +1,4 @@ +def generate(env):
+ env['Site_TestTool1'] = 1
+def exists(env):
+ return 1
diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/__init__.py new file mode 100644 index 0000000..60bbd02 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/__init__.py @@ -0,0 +1,4 @@ +def generate(env):
+ env['Site_TestTool3'] = 1
+def exists(env):
+ return 1
diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/sconstest.skip b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/sconstest.skip new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/sconstest.skip diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/__init__.py diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/sconstest.skip b/test/toolpath/nested/image/site_scons/site_tools/subdir1/sconstest.skip new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/sconstest.skip diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Site_TestTool2.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Site_TestTool2.py new file mode 100644 index 0000000..adae55b --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Site_TestTool2.py @@ -0,0 +1,4 @@ +def generate(env):
+ env['Site_TestTool2'] = 1
+def exists(env):
+ return 1
diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/__init__.py diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/sconstest.skip b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/sconstest.skip new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/sconstest.skip diff --git a/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool1.py b/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool1.py new file mode 100644 index 0000000..072daf0 --- /dev/null +++ b/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool1.py @@ -0,0 +1,4 @@ +def generate(env):
+ env['Toolpath_TestTool1'] = 1
+def exists(env):
+ return 1
diff --git a/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/__init__.py b/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/__init__.py new file mode 100644 index 0000000..26bc748 --- /dev/null +++ b/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/__init__.py @@ -0,0 +1,4 @@ +def generate(env):
+ env['Toolpath_TestTool3'] = 1
+def exists(env):
+ return 1
diff --git a/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/sconstest.skip b/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/sconstest.skip new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/sconstest.skip diff --git a/test/toolpath/nested/image/tools/subdir1/__init__.py b/test/toolpath/nested/image/tools/subdir1/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/toolpath/nested/image/tools/subdir1/__init__.py diff --git a/test/toolpath/nested/image/tools/subdir1/sconstest.skip b/test/toolpath/nested/image/tools/subdir1/sconstest.skip new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/toolpath/nested/image/tools/subdir1/sconstest.skip diff --git a/test/toolpath/nested/image/tools/subdir1/subdir2/Toolpath_TestTool2.py b/test/toolpath/nested/image/tools/subdir1/subdir2/Toolpath_TestTool2.py new file mode 100644 index 0000000..f4ccefe --- /dev/null +++ b/test/toolpath/nested/image/tools/subdir1/subdir2/Toolpath_TestTool2.py @@ -0,0 +1,4 @@ +def generate(env):
+ env['Toolpath_TestTool2'] = 1
+def exists(env):
+ return 1
diff --git a/test/toolpath/nested/image/tools/subdir1/subdir2/__init__.py b/test/toolpath/nested/image/tools/subdir1/subdir2/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/toolpath/nested/image/tools/subdir1/subdir2/__init__.py diff --git a/test/toolpath/nested/image/tools/subdir1/subdir2/sconstest.skip b/test/toolpath/nested/image/tools/subdir1/subdir2/sconstest.skip new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/toolpath/nested/image/tools/subdir1/subdir2/sconstest.skip diff --git a/test/toolpath/nested/nested.py b/test/toolpath/nested/nested.py new file mode 100644 index 0000000..7304dd5 --- /dev/null +++ b/test/toolpath/nested/nested.py @@ -0,0 +1,55 @@ +#!/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__" + +import os.path +import TestSCons + +test = TestSCons.TestSCons() + +test.dir_fixture('image') + +test.run(arguments = '.', stdout = """\ +scons: Reading SConscript files ... +env1['Site_TestTool1'] = 1 +env1['Site_TestTool2'] = 1 +env1['Site_TestTool3'] = 1 +env2['Toolpath_TestTool1'] = 1 +env2['Toolpath_TestTool2'] = 1 +env2['Toolpath_TestTool3'] = 1 +derived['Toolpath_TestTool1'] = 1 +scons: done reading SConscript files. +scons: Building targets ... +scons: `.' is up to date. +scons: done building targets. +""") + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: |