summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2019-08-23 19:58:18 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2019-08-23 19:58:18 (GMT)
commit3708316a79135e215a58e30b69b59222c123957b (patch)
tree65bf8623ac57b0961b1ea866aec413db96f7ba0d /test
parent3f44315bbd796bbb348f26778b43f66d0cf41c2b (diff)
downloadSCons-3708316a79135e215a58e30b69b59222c123957b.zip
SCons-3708316a79135e215a58e30b69b59222c123957b.tar.gz
SCons-3708316a79135e215a58e30b69b59222c123957b.tar.bz2
Changes to make test multi-platform (wasn't working on windows).
Diffstat (limited to 'test')
-rw-r--r--test/TaskMaster/bug_2811/fixture_dir/SConstruct10
-rw-r--r--test/TaskMaster/bug_2811/fixture_dir/mycopy.py8
2 files changed, 15 insertions, 3 deletions
diff --git a/test/TaskMaster/bug_2811/fixture_dir/SConstruct b/test/TaskMaster/bug_2811/fixture_dir/SConstruct
index c124902..d453368 100644
--- a/test/TaskMaster/bug_2811/fixture_dir/SConstruct
+++ b/test/TaskMaster/bug_2811/fixture_dir/SConstruct
@@ -10,6 +10,7 @@ This issue requires the following.
Nth target's implicit lists changing when compared to SConsign's which have been loaded.
7. This forces rebuild of source file and this propagates to massive recompile
"""
+import sys
import SCons.Tool
@@ -27,12 +28,15 @@ def _dwo_emitter(target, source, env):
targets = target + new_targets
return (targets, source)
+build_string = '$MYCOPY $SOURCE $TARGET'
-bld = Builder(action='cp $SOURCE $TARGET')
-env = Environment(BUILDERS={'Foo': bld})
+bld = Builder(action=build_string)
+
+env = Environment(BUILDERS={'Foo': bld}, MYCOPY="%s mycopy.py"%sys.executable)
+
+env['SHCCCOM'] = '$MYCOPY $SOURCE $TARGET && $MYCOPY $SOURCE ${TARGETS[1]}'
-env['SHCCCOM'] = 'cp $SOURCE $TARGET && cp $SOURCE ${TARGETS[1]}'
env['SHCCCOMSTR'] = env['SHCCCOM']
diff --git a/test/TaskMaster/bug_2811/fixture_dir/mycopy.py b/test/TaskMaster/bug_2811/fixture_dir/mycopy.py
new file mode 100644
index 0000000..c1a57f5
--- /dev/null
+++ b/test/TaskMaster/bug_2811/fixture_dir/mycopy.py
@@ -0,0 +1,8 @@
+import sys
+import shutil
+
+ffrom = sys.argv[1]
+to = sys.argv[2]
+shutil.copyfile(ffrom, to)
+
+sys.exit(0)