diff options
author | Steven Knight <knight@baldmt.com> | 2005-08-12 22:08:38 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-08-12 22:08:38 (GMT) |
commit | 055a212a12d75036cdfbaf2b954e39908a2fbac1 (patch) | |
tree | 6117b2ff614672e0d687fd97ede7bddc2ea9ef59 /test/LINK | |
parent | 62b1b28dd7e952eb3d9910feb39fde8f02dd5dfa (diff) | |
download | SCons-055a212a12d75036cdfbaf2b954e39908a2fbac1.zip SCons-055a212a12d75036cdfbaf2b954e39908a2fbac1.tar.gz SCons-055a212a12d75036cdfbaf2b954e39908a2fbac1.tar.bz2 |
Enhance EnsureSConsVersion() to take revision numbers, too. (Amir Szekely)
Diffstat (limited to 'test/LINK')
-rw-r--r-- | test/LINK/LINKFLAGS.py | 9 | ||||
-rw-r--r-- | test/LINK/SHLINKFLAGS.py | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/test/LINK/LINKFLAGS.py b/test/LINK/LINKFLAGS.py index 047ddc7..9a6ef1c 100644 --- a/test/LINK/LINKFLAGS.py +++ b/test/LINK/LINKFLAGS.py @@ -39,13 +39,14 @@ test.write("wrapper.py", import string import sys open('%s', 'wb').write("wrapper.py\\n") -os.system(string.join(sys.argv[1:], " ")) +args = filter(lambda s: s != 'fake_link_flag', sys.argv[1:]) +os.system(string.join(args, " ")) """ % string.replace(test.workpath('wrapper.out'), '\\', '\\\\')) test.write('SConstruct', """ foo = Environment() -link = foo.subst("$LINK") -bar = Environment(LINK = '', LINKFLAGS = r'%s wrapper.py ' + link) +bar = Environment(LINK = foo.subst(r'%s wrapper.py $LINK'), + LINKFLAGS = foo.subst('$LINKFLAGS fake_link_flag')) foo.Program(target = 'foo', source = 'foo.c') bar.Program(target = 'bar', source = 'bar.c') """ % python) @@ -73,7 +74,7 @@ main(int argc, char *argv[]) test.run(arguments = 'foo' + _exe) -test.fail_test(os.path.exists(test.workpath('wrapper.out'))) +test.must_not_exist(test.workpath('wrapper.out')) test.run(arguments = 'bar' + _exe) diff --git a/test/LINK/SHLINKFLAGS.py b/test/LINK/SHLINKFLAGS.py index 88e2442..c9ecf21 100644 --- a/test/LINK/SHLINKFLAGS.py +++ b/test/LINK/SHLINKFLAGS.py @@ -40,13 +40,14 @@ test.write("wrapper.py", import string import sys open('%s', 'wb').write("wrapper.py\\n") -os.system(string.join(sys.argv[1:], " ")) +args = filter(lambda s: s != 'fake_shlink_flag', sys.argv[1:]) +os.system(string.join(args, " ")) """ % string.replace(test.workpath('wrapper.out'), '\\', '\\\\')) test.write('SConstruct', """ foo = Environment() -bar = Environment(SHLINK = '', - SHLINKFLAGS = foo.subst(r'%s wrapper.py $SHLINK $SHLINKFLAGS')) +bar = Environment(SHLINK = foo.subst(r'%s wrapper.py $SHLINK'), + SHLINKFLAGS = foo.subst('$SHLINKFLAGS fake_shlink_flag')) foo.SharedLibrary(target = 'foo', source = 'foo.c') bar.SharedLibrary(target = 'bar', source = 'bar.c') """ % python) @@ -75,7 +76,7 @@ test() test.run(arguments = lib_ + 'foo' + _shlib) -test.fail_test(os.path.exists(test.workpath('wrapper.out'))) +test.must_not_exist(test.workpath('wrapper.out')) test.run(arguments = lib_ + 'bar' + _shlib) |