From 8538f41852596fc1407f96d98b1be677aaf36be4 Mon Sep 17 00:00:00 2001 From: grbd Date: Thu, 27 Jul 2017 21:20:30 +0100 Subject: update to tests for nested tools and to add as an example for using sys.path in the toolpath --- .../image/Libs/tools_example/Toolpath_TestTool1.py | 4 ++ .../tools_example/Toolpath_TestTool2/__init__.py | 4 ++ .../Toolpath_TestTool2/sconstest.skip | 0 .../nested/image/Libs/tools_example/__init__.py | 0 .../nested/image/Libs/tools_example/sconstest.skip | 0 .../tools_example/subdir1/Toolpath_TestTool1_1.py | 4 ++ .../subdir1/Toolpath_TestTool1_2/__init__.py | 4 ++ .../subdir1/Toolpath_TestTool1_2/sconstest.skip | 0 .../image/Libs/tools_example/subdir1/__init__.py | 0 .../Libs/tools_example/subdir1/sconstest.skip | 0 .../subdir1/subdir2/Toolpath_TestTool2_1.py | 4 ++ .../subdir2/Toolpath_TestTool2_2/__init__.py | 4 ++ .../subdir2/Toolpath_TestTool2_2/sconstest.skip | 0 .../Libs/tools_example/subdir1/subdir2/__init__.py | 0 .../tools_example/subdir1/subdir2/sconstest.skip | 0 test/toolpath/nested/image/SConstruct | 71 ++++++++++++++++++---- .../site_scons/site_tools/Toolpath_TestTool1.py | 4 ++ .../site_tools/Toolpath_TestTool2/__init__.py | 4 ++ .../site_tools/Toolpath_TestTool2/sconstest.skip | 0 .../nested/image/site_scons/site_tools/__init__.py | 0 .../image/site_scons/site_tools/sconstest.skip | 0 .../site_tools/subdir1/Site_TestTool1.py | 4 -- .../site_tools/subdir1/Site_TestTool3/__init__.py | 4 -- .../subdir1/Site_TestTool3/sconstest.skip | 0 .../site_tools/subdir1/Toolpath_TestTool1_1.py | 4 ++ .../subdir1/Toolpath_TestTool1_2/__init__.py | 4 ++ .../subdir1/Toolpath_TestTool1_2/sconstest.skip | 0 .../site_tools/subdir1/subdir2/Site_TestTool2.py | 4 -- .../subdir1/subdir2/Toolpath_TestTool2_1.py | 4 ++ .../subdir2/Toolpath_TestTool2_2/__init__.py | 4 ++ .../subdir2/Toolpath_TestTool2_2/sconstest.skip | 0 test/toolpath/nested/image/testsrc1.txt | 0 .../image/tools/subdir1/Toolpath_TestTool1.py | 4 -- .../tools/subdir1/Toolpath_TestTool3/__init__.py | 4 -- .../subdir1/Toolpath_TestTool3/sconstest.skip | 0 .../nested/image/tools/subdir1/__init__.py | 0 .../nested/image/tools/subdir1/sconstest.skip | 0 .../tools/subdir1/subdir2/Toolpath_TestTool2.py | 4 -- .../nested/image/tools/subdir1/subdir2/__init__.py | 0 .../image/tools/subdir1/subdir2/sconstest.skip | 0 test/toolpath/nested/nested.py | 27 ++++++-- 41 files changed, 129 insertions(+), 41 deletions(-) create mode 100644 test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool1.py create mode 100644 test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/__init__.py create mode 100644 test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/sconstest.skip create mode 100644 test/toolpath/nested/image/Libs/tools_example/__init__.py create mode 100644 test/toolpath/nested/image/Libs/tools_example/sconstest.skip create mode 100644 test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_1.py create mode 100644 test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/__init__.py create mode 100644 test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/sconstest.skip create mode 100644 test/toolpath/nested/image/Libs/tools_example/subdir1/__init__.py create mode 100644 test/toolpath/nested/image/Libs/tools_example/subdir1/sconstest.skip create mode 100644 test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_1.py create mode 100644 test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py create mode 100644 test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/sconstest.skip create mode 100644 test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/__init__.py create mode 100644 test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/sconstest.skip create mode 100644 test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool1.py create mode 100644 test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/__init__.py create mode 100644 test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/sconstest.skip create mode 100644 test/toolpath/nested/image/site_scons/site_tools/__init__.py create mode 100644 test/toolpath/nested/image/site_scons/site_tools/sconstest.skip delete mode 100644 test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool1.py delete mode 100644 test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/__init__.py delete mode 100644 test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/sconstest.skip create mode 100644 test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_1.py create mode 100644 test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/__init__.py create mode 100644 test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/sconstest.skip delete mode 100644 test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Site_TestTool2.py create mode 100644 test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_1.py create mode 100644 test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py create mode 100644 test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/sconstest.skip create mode 100644 test/toolpath/nested/image/testsrc1.txt delete mode 100644 test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool1.py delete mode 100644 test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/__init__.py delete mode 100644 test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/sconstest.skip delete mode 100644 test/toolpath/nested/image/tools/subdir1/__init__.py delete mode 100644 test/toolpath/nested/image/tools/subdir1/sconstest.skip delete mode 100644 test/toolpath/nested/image/tools/subdir1/subdir2/Toolpath_TestTool2.py delete mode 100644 test/toolpath/nested/image/tools/subdir1/subdir2/__init__.py delete mode 100644 test/toolpath/nested/image/tools/subdir1/subdir2/sconstest.skip diff --git a/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool1.py b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool1.py new file mode 100644 index 0000000..072daf0 --- /dev/null +++ b/test/toolpath/nested/image/Libs/tools_example/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/Libs/tools_example/Toolpath_TestTool2/__init__.py b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/__init__.py new file mode 100644 index 0000000..f4ccefe --- /dev/null +++ b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/__init__.py @@ -0,0 +1,4 @@ +def generate(env): + env['Toolpath_TestTool2'] = 1 +def exists(env): + return 1 diff --git a/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/sconstest.skip b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/Libs/tools_example/__init__.py b/test/toolpath/nested/image/Libs/tools_example/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/Libs/tools_example/sconstest.skip b/test/toolpath/nested/image/Libs/tools_example/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_1.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_1.py new file mode 100644 index 0000000..2a70e67 --- /dev/null +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_1.py @@ -0,0 +1,4 @@ +def generate(env): + env['Toolpath_TestTool1_1'] = 1 +def exists(env): + return 1 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/__init__.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/__init__.py new file mode 100644 index 0000000..424991f --- /dev/null +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/__init__.py @@ -0,0 +1,4 @@ +def generate(env): + env['Toolpath_TestTool1_2'] = 1 +def exists(env): + return 1 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/sconstest.skip b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/__init__.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/sconstest.skip b/test/toolpath/nested/image/Libs/tools_example/subdir1/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_1.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_1.py new file mode 100644 index 0000000..13d0496 --- /dev/null +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_1.py @@ -0,0 +1,4 @@ +def generate(env): + env['Toolpath_TestTool2_1'] = 1 +def exists(env): + return 1 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py new file mode 100644 index 0000000..3f8fd5e --- /dev/null +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py @@ -0,0 +1,4 @@ +def generate(env): + env['Toolpath_TestTool2_2'] = 1 +def exists(env): + return 1 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/sconstest.skip b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/__init__.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/sconstest.skip b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/SConstruct b/test/toolpath/nested/image/SConstruct index 284f21c..b20d8e6 100644 --- a/test/toolpath/nested/image/SConstruct +++ b/test/toolpath/nested/image/SConstruct @@ -1,15 +1,62 @@ -# 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']) +import sys, os + +toollist = ['Toolpath_TestTool1', + 'Toolpath_TestTool2', + 'subdir1.Toolpath_TestTool1_1', + 'subdir1.Toolpath_TestTool1_2', + 'subdir1.subdir2.Toolpath_TestTool2_1', + 'subdir1.subdir2.Toolpath_TestTool2_2', + ] + +print('Test where tools are located under site_scons/site_tools') +env1 = Environment(tools=toollist) +print("env1['Toolpath_TestTool1'] =", env1.get('Toolpath_TestTool1')) +print("env1['Toolpath_TestTool2'] =", env1.get('Toolpath_TestTool2')) +print("env1['Toolpath_TestTool1_1'] =", env1.get('Toolpath_TestTool1_1')) +print("env1['Toolpath_TestTool1_2'] =", env1.get('Toolpath_TestTool1_2')) +print("env1['Toolpath_TestTool2_1'] =", env1.get('Toolpath_TestTool2_1')) +print("env1['Toolpath_TestTool2_2'] =", env1.get('Toolpath_TestTool2_2')) + +print('Test where toolpath is set in the env constructor') +env2 = Environment(tools=toollist, toolpath=['Libs/tools_example']) print("env2['Toolpath_TestTool1'] =", env2.get('Toolpath_TestTool1')) print("env2['Toolpath_TestTool2'] =", env2.get('Toolpath_TestTool2')) -print("env2['Toolpath_TestTool3'] =", env2.get('Toolpath_TestTool3')) +print("env2['Toolpath_TestTool1_1'] =", env2.get('Toolpath_TestTool1_1')) +print("env2['Toolpath_TestTool1_2'] =", env2.get('Toolpath_TestTool1_2')) +print("env2['Toolpath_TestTool2_1'] =", env2.get('Toolpath_TestTool2_1')) +print("env2['Toolpath_TestTool2_2'] =", env2.get('Toolpath_TestTool2_2')) + +print('Test a Clone') +base = Environment(tools=[], toolpath=['Libs/tools_example']) +derived = base.Clone(tools=['subdir1.Toolpath_TestTool1_1']) +print("derived['Toolpath_TestTool1_1'] =", derived.get('Toolpath_TestTool1_1')) + + +print('Test using syspath as the toolpath') +print('Lets pretend that tools_example within Libs is actually a module installed via pip') +oldsyspath = sys.path +dir_path = Dir('.').srcnode().abspath +dir_path = os.path.join(dir_path, 'Libs') +sys.path.append(dir_path) + +toollist = ['tools_example.Toolpath_TestTool1', + 'tools_example.Toolpath_TestTool2', + 'tools_example.subdir1.Toolpath_TestTool1_1', + 'tools_example.subdir1.Toolpath_TestTool1_2', + 'tools_example.subdir1.subdir2.Toolpath_TestTool2_1', + 'tools_example.subdir1.subdir2.Toolpath_TestTool2_2', + ] + +env3 = Environment(tools=toollist, toolpath=sys.path) +print("env3['Toolpath_TestTool1'] =", env3.get('Toolpath_TestTool1')) +print("env3['Toolpath_TestTool2'] =", env3.get('Toolpath_TestTool2')) +print("env3['Toolpath_TestTool1_1'] =", env3.get('Toolpath_TestTool1_1')) +print("env3['Toolpath_TestTool1_2'] =", env3.get('Toolpath_TestTool1_2')) +print("env3['Toolpath_TestTool2_1'] =", env3.get('Toolpath_TestTool2_1')) +print("env3['Toolpath_TestTool2_2'] =", env3.get('Toolpath_TestTool2_2')) + +sys.path = oldsyspath -base = Environment(tools=[], toolpath=['tools']) -derived = base.Clone(tools=['subdir1.Toolpath_TestTool1']) -print("derived['Toolpath_TestTool1'] =", derived.get('Toolpath_TestTool1')) +# TODO +# 1. add docs for below +# 3. redo test output capture diff --git a/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool1.py b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool1.py new file mode 100644 index 0000000..072daf0 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/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/site_scons/site_tools/Toolpath_TestTool2/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/__init__.py new file mode 100644 index 0000000..f4ccefe --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/__init__.py @@ -0,0 +1,4 @@ +def generate(env): + env['Toolpath_TestTool2'] = 1 +def exists(env): + return 1 diff --git a/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/sconstest.skip b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/site_scons/site_tools/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/site_scons/site_tools/sconstest.skip b/test/toolpath/nested/image/site_scons/site_tools/sconstest.skip new file mode 100644 index 0000000..e69de29 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 deleted file mode 100644 index d4a19a8..0000000 --- a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool1.py +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 60bbd02..0000000 --- a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index e69de29..0000000 diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_1.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_1.py new file mode 100644 index 0000000..2a70e67 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_1.py @@ -0,0 +1,4 @@ +def generate(env): + env['Toolpath_TestTool1_1'] = 1 +def exists(env): + return 1 diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/__init__.py new file mode 100644 index 0000000..424991f --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/__init__.py @@ -0,0 +1,4 @@ +def generate(env): + env['Toolpath_TestTool1_2'] = 1 +def exists(env): + return 1 diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/sconstest.skip b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/sconstest.skip new file mode 100644 index 0000000..e69de29 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 deleted file mode 100644 index adae55b..0000000 --- a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Site_TestTool2.py +++ /dev/null @@ -1,4 +0,0 @@ -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/Toolpath_TestTool2_1.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_1.py new file mode 100644 index 0000000..13d0496 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_1.py @@ -0,0 +1,4 @@ +def generate(env): + env['Toolpath_TestTool2_1'] = 1 +def exists(env): + return 1 diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py new file mode 100644 index 0000000..3f8fd5e --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py @@ -0,0 +1,4 @@ +def generate(env): + env['Toolpath_TestTool2_2'] = 1 +def exists(env): + return 1 diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/sconstest.skip b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/sconstest.skip new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/testsrc1.txt b/test/toolpath/nested/image/testsrc1.txt new file mode 100644 index 0000000..e69de29 diff --git a/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool1.py b/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool1.py deleted file mode 100644 index 072daf0..0000000 --- a/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool1.py +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 26bc748..0000000 --- a/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index e69de29..0000000 diff --git a/test/toolpath/nested/image/tools/subdir1/__init__.py b/test/toolpath/nested/image/tools/subdir1/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/toolpath/nested/image/tools/subdir1/sconstest.skip b/test/toolpath/nested/image/tools/subdir1/sconstest.skip deleted file mode 100644 index e69de29..0000000 diff --git a/test/toolpath/nested/image/tools/subdir1/subdir2/Toolpath_TestTool2.py b/test/toolpath/nested/image/tools/subdir1/subdir2/Toolpath_TestTool2.py deleted file mode 100644 index f4ccefe..0000000 --- a/test/toolpath/nested/image/tools/subdir1/subdir2/Toolpath_TestTool2.py +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index e69de29..0000000 diff --git a/test/toolpath/nested/image/tools/subdir1/subdir2/sconstest.skip b/test/toolpath/nested/image/tools/subdir1/subdir2/sconstest.skip deleted file mode 100644 index e69de29..0000000 diff --git a/test/toolpath/nested/nested.py b/test/toolpath/nested/nested.py index 7304dd5..a736d58 100644 --- a/test/toolpath/nested/nested.py +++ b/test/toolpath/nested/nested.py @@ -33,13 +33,30 @@ test.dir_fixture('image') test.run(arguments = '.', stdout = """\ scons: Reading SConscript files ... -env1['Site_TestTool1'] = 1 -env1['Site_TestTool2'] = 1 -env1['Site_TestTool3'] = 1 +Test where tools are located under site_scons/site_tools +env1['Toolpath_TestTool1'] = 1 +env1['Toolpath_TestTool2'] = 1 +env1['Toolpath_TestTool1_1'] = 1 +env1['Toolpath_TestTool1_2'] = 1 +env1['Toolpath_TestTool2_1'] = 1 +env1['Toolpath_TestTool2_2'] = 1 +Test where toolpath is set in the env constructor env2['Toolpath_TestTool1'] = 1 env2['Toolpath_TestTool2'] = 1 -env2['Toolpath_TestTool3'] = 1 -derived['Toolpath_TestTool1'] = 1 +env2['Toolpath_TestTool1_1'] = 1 +env2['Toolpath_TestTool1_2'] = 1 +env2['Toolpath_TestTool2_1'] = 1 +env2['Toolpath_TestTool2_2'] = 1 +Test a Clone +derived['Toolpath_TestTool1_1'] = 1 +Test using syspath as the toolpath +Lets pretend that tools_example within Libs is actually a module installed via pip +env3['Toolpath_TestTool1'] = 1 +env3['Toolpath_TestTool2'] = 1 +env3['Toolpath_TestTool1_1'] = 1 +env3['Toolpath_TestTool1_2'] = 1 +env3['Toolpath_TestTool2_1'] = 1 +env3['Toolpath_TestTool2_2'] = 1 scons: done reading SConscript files. scons: Building targets ... scons: `.' is up to date. -- cgit v0.12