From 3708316a79135e215a58e30b69b59222c123957b Mon Sep 17 00:00:00 2001 From: William Deegan Date: Fri, 23 Aug 2019 12:58:18 -0700 Subject: Changes to make test multi-platform (wasn't working on windows). --- test/TaskMaster/bug_2811/fixture_dir/SConstruct | 10 +++++++--- test/TaskMaster/bug_2811/fixture_dir/mycopy.py | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 test/TaskMaster/bug_2811/fixture_dir/mycopy.py 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) -- cgit v0.12