summaryrefslogtreecommitdiffstats
path: root/test/TaskMaster
diff options
context:
space:
mode:
Diffstat (limited to 'test/TaskMaster')
-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)