summaryrefslogtreecommitdiffstats
path: root/test/LINK
diff options
context:
space:
mode:
Diffstat (limited to 'test/LINK')
-rw-r--r--test/LINK/LINK.py10
-rw-r--r--test/LINK/LINKCOM.py4
-rw-r--r--test/LINK/LINKCOMSTR.py4
-rw-r--r--test/LINK/LINKFLAGS.py10
-rw-r--r--test/LINK/SHLINK.py6
-rw-r--r--test/LINK/SHLINKCOM.py6
-rw-r--r--test/LINK/SHLINKCOMSTR.py10
-rw-r--r--test/LINK/SHLINKFLAGS.py6
8 files changed, 32 insertions, 24 deletions
diff --git a/test/LINK/LINK.py b/test/LINK/LINK.py
index 2d89352..ede03f5 100644
--- a/test/LINK/LINK.py
+++ b/test/LINK/LINK.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = TestSCons.python
+_python_ = TestSCons._python_
_exe = TestSCons._exe
test = TestSCons.TestSCons()
@@ -45,12 +45,14 @@ os.system(string.join(sys.argv[1:], " "))
test.write('SConstruct', """
foo = Environment()
link = foo.subst("$LINK")
-bar = Environment(LINK = r'%s wrapper.py ' + link)
+bar = Environment(LINK = r'%(_python_)s wrapper.py ' + link)
foo.Program(target = 'foo', source = 'foo.c')
bar.Program(target = 'bar', source = 'bar.c')
-""" % python)
+""" % locals())
test.write('foo.c', r"""
+#include <stdio.h>
+#include <stdlib.h>
int
main(int argc, char *argv[])
{
@@ -61,6 +63,8 @@ main(int argc, char *argv[])
""")
test.write('bar.c', r"""
+#include <stdio.h>
+#include <stdlib.h>
int
main(int argc, char *argv[])
{
diff --git a/test/LINK/LINKCOM.py b/test/LINK/LINKCOM.py
index c94d5e3..d914049 100644
--- a/test/LINK/LINKCOM.py
+++ b/test/LINK/LINKCOM.py
@@ -33,7 +33,7 @@ import string
import sys
import TestSCons
-python = TestSCons.python
+_python_ = TestSCons._python_
_exe = TestSCons._exe
test = TestSCons.TestSCons()
@@ -51,7 +51,7 @@ sys.exit(0)
""")
test.write('SConstruct', """
-env = Environment(LINKCOM = r'%(python)s mylink.py $TARGET $SOURCES',
+env = Environment(LINKCOM = r'%(_python_)s mylink.py $TARGET $SOURCES',
OBJSUFFIX = '.obj',
PROGSUFFIX = '.exe')
env.Program(target = 'test1', source = ['test1.obj', 'test2.obj'])
diff --git a/test/LINK/LINKCOMSTR.py b/test/LINK/LINKCOMSTR.py
index 70b5c0c..1a7efbe 100644
--- a/test/LINK/LINKCOMSTR.py
+++ b/test/LINK/LINKCOMSTR.py
@@ -34,7 +34,7 @@ import string
import sys
import TestSCons
-python = TestSCons.python
+_python_ = TestSCons._python_
_exe = TestSCons._exe
test = TestSCons.TestSCons()
@@ -52,7 +52,7 @@ sys.exit(0)
""")
test.write('SConstruct', """
-env = Environment(LINKCOM = r'%(python)s mylink.py $TARGET $SOURCES',
+env = Environment(LINKCOM = r'%(_python_)s mylink.py $TARGET $SOURCES',
LINKCOMSTR = 'Linking $TARGET from $SOURCES',
OBJSUFFIX = '.obj',
PROGSUFFIX = '.exe')
diff --git a/test/LINK/LINKFLAGS.py b/test/LINK/LINKFLAGS.py
index ca1cd1a..d80960d 100644
--- a/test/LINK/LINKFLAGS.py
+++ b/test/LINK/LINKFLAGS.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = TestSCons.python
+_python_ = TestSCons._python_
_exe = TestSCons._exe
test = TestSCons.TestSCons()
@@ -45,13 +45,15 @@ os.system(string.join(args, " "))
test.write('SConstruct', """
foo = Environment()
-bar = Environment(LINK = foo.subst(r'%s wrapper.py $LINK'),
+bar = Environment(LINK = foo.subst(r'%(_python_)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)
+""" % locals())
test.write('foo.c', r"""
+#include <stdio.h>
+#include <stdlib.h>
int
main(int argc, char *argv[])
{
@@ -62,6 +64,8 @@ main(int argc, char *argv[])
""")
test.write('bar.c', r"""
+#include <stdio.h>
+#include <stdlib.h>
int
main(int argc, char *argv[])
{
diff --git a/test/LINK/SHLINK.py b/test/LINK/SHLINK.py
index 8b9097d..296845c 100644
--- a/test/LINK/SHLINK.py
+++ b/test/LINK/SHLINK.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = TestSCons.python
+_python_ = TestSCons._python_
dll_ = TestSCons.dll_
_shlib = TestSCons._dll
@@ -46,10 +46,10 @@ os.system(string.join(sys.argv[1:], " "))
test.write('SConstruct', """
foo = Environment()
shlink = foo.Dictionary('SHLINK')
-bar = Environment(SHLINK = r'%s wrapper.py ' + shlink)
+bar = Environment(SHLINK = r'%(_python_)s wrapper.py ' + shlink)
foo.SharedLibrary(target = 'foo', source = 'foo.c')
bar.SharedLibrary(target = 'bar', source = 'bar.c')
-""" % python)
+""" % locals())
test.write('foo.c', r"""
#include <stdio.h>
diff --git a/test/LINK/SHLINKCOM.py b/test/LINK/SHLINKCOM.py
index d97c4ed..2d2f718 100644
--- a/test/LINK/SHLINKCOM.py
+++ b/test/LINK/SHLINKCOM.py
@@ -33,7 +33,7 @@ import string
import sys
import TestSCons
-python = TestSCons.python
+_python_ = TestSCons._python_
test = TestSCons.TestSCons()
@@ -60,8 +60,8 @@ sys.exit(0)
""")
test.write('SConstruct', """
-env = Environment(SHCCCOM = r'%(python)s mycc.py $TARGET $SOURCES',
- SHLINKCOM = r'%(python)s mylink.py $TARGET $SOURCES',
+env = Environment(SHCCCOM = r'%(_python_)s mycc.py $TARGET $SOURCES',
+ SHLINKCOM = r'%(_python_)s mylink.py $TARGET $SOURCES',
SHOBJSUFFIX = '.obj',
SHLIBPREFIX = '',
SHLIBSUFFIX = '.dll')
diff --git a/test/LINK/SHLINKCOMSTR.py b/test/LINK/SHLINKCOMSTR.py
index 1ea29b2..cf31813 100644
--- a/test/LINK/SHLINKCOMSTR.py
+++ b/test/LINK/SHLINKCOMSTR.py
@@ -34,7 +34,7 @@ import string
import sys
import TestSCons
-python = TestSCons.python
+_python_ = TestSCons._python_
test = TestSCons.TestSCons()
@@ -61,8 +61,8 @@ sys.exit(0)
""")
test.write('SConstruct', """
-env = Environment(SHCCCOM = r'%(python)s mycc.py $TARGET $SOURCES',
- SHLINKCOM = r'%(python)s mylink.py $TARGET $SOURCES',
+env = Environment(SHCCCOM = r'%(_python_)s mycc.py $TARGET $SOURCES',
+ SHLINKCOM = r'%(_python_)s mylink.py $TARGET $SOURCES',
SHLINKCOMSTR = 'Linking shared $TARGET from $SOURCES',
SHOBJSUFFIX = '.obj',
SHLIBPREFIX = '',
@@ -85,8 +85,8 @@ test2.c
""")
test.run(stdout = test.wrap_stdout("""\
-%(python)s mycc.py test1.obj test1.c
-%(python)s mycc.py test2.obj test2.c
+%(_python_)s mycc.py test1.obj test1.c
+%(_python_)s mycc.py test2.obj test2.c
Linking shared test3.dll from test1.obj test2.obj
""" % locals()))
diff --git a/test/LINK/SHLINKFLAGS.py b/test/LINK/SHLINKFLAGS.py
index 709ebc6..51a8f7c 100644
--- a/test/LINK/SHLINKFLAGS.py
+++ b/test/LINK/SHLINKFLAGS.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = TestSCons.python
+_python_ = TestSCons._python_
lib_ = TestSCons.dll_
_shlib = TestSCons._dll
@@ -46,11 +46,11 @@ os.system(string.join(args, " "))
test.write('SConstruct', """
foo = Environment()
-bar = Environment(SHLINK = foo.subst(r'%s wrapper.py $SHLINK'),
+bar = Environment(SHLINK = foo.subst(r'%(_python_)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)
+""" % locals())
test.write('foo.c', r"""
#include <stdio.h>