summaryrefslogtreecommitdiffstats
path: root/test/AR
diff options
context:
space:
mode:
Diffstat (limited to 'test/AR')
-rw-r--r--test/AR/AR.py13
-rw-r--r--test/AR/ARCOM.py8
-rw-r--r--test/AR/ARCOMSTR.py8
-rw-r--r--test/AR/ARFLAGS.py12
4 files changed, 27 insertions, 14 deletions
diff --git a/test/AR/AR.py b/test/AR/AR.py
index 32419fa..cb11175 100644
--- a/test/AR/AR.py
+++ b/test/AR/AR.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = TestSCons.python
+_python_ = TestSCons._python_
_exe = TestSCons._exe
test = TestSCons.TestSCons()
@@ -45,7 +45,7 @@ os.system(string.join(sys.argv[1:], " "))
test.write('SConstruct', """
foo = Environment(LIBS = ['foo'], LIBPATH = ['.'])
ar = foo.Dictionary('AR')
-bar = Environment(LIBS = ['bar'], LIBPATH = ['.'], AR = r'%s wrapper.py ' + ar)
+bar = Environment(LIBS = ['bar'], LIBPATH = ['.'], AR = r'%(_python_)s wrapper.py ' + ar)
foo.Library(target = 'foo', source = 'foo.c')
bar.Library(target = 'bar', source = 'bar.c')
@@ -53,9 +53,11 @@ obj = foo.Object('main', 'main.c')
foo.Program(target = 'f', source = obj)
bar.Program(target = 'b', source = obj)
-""" % python)
+""" % locals())
test.write('foo.c', r"""
+#include <stdio.h>
+
void
library_function(void)
{
@@ -64,6 +66,8 @@ library_function(void)
""")
test.write('bar.c', r"""
+#include <stdio.h>
+
void
library_function(void)
{
@@ -72,6 +76,9 @@ library_function(void)
""")
test.write('main.c', r"""
+#include <stdio.h>
+#include <stdlib.h>
+
int
main(int argc, char *argv[])
{
diff --git a/test/AR/ARCOM.py b/test/AR/ARCOM.py
index c8ac1d8..73c36fc 100644
--- a/test/AR/ARCOM.py
+++ b/test/AR/ARCOM.py
@@ -30,7 +30,7 @@ Test the ability to configure the $ARCOM construction variable.
import TestSCons
-python = TestSCons.python
+_python_ = TestSCons._python_
test = TestSCons.TestSCons()
@@ -51,12 +51,12 @@ test.write('myranlib.py', """
test.write('SConstruct', """
env = Environment(tools=['default', 'ar'],
- ARCOM = r'%s myar.py $TARGET $SOURCES',
- RANLIBCOM = r'%s myranlib.py $TARGET',
+ ARCOM = r'%(_python_)s myar.py $TARGET $SOURCES',
+ RANLIBCOM = r'%(_python_)s myranlib.py $TARGET',
LIBPREFIX = '',
LIBSUFFIX = '.lib')
env.Library(target = 'output', source = ['file.1', 'file.2'])
-""" % (python, python))
+""" % locals())
test.write('file.1', "file.1\n/*ar*/\n")
test.write('file.2', "file.2\n/*ar*/\n")
diff --git a/test/AR/ARCOMSTR.py b/test/AR/ARCOMSTR.py
index ae63ea0..914031b 100644
--- a/test/AR/ARCOMSTR.py
+++ b/test/AR/ARCOMSTR.py
@@ -32,7 +32,7 @@ the displayed archiver string.
import TestSCons
import string
-python = TestSCons.python
+_python_ = TestSCons._python_
test = TestSCons.TestSCons()
@@ -53,13 +53,13 @@ test.write('myranlib.py', """
test.write('SConstruct', """
env = Environment(tools=['default', 'ar'],
- ARCOM = r'%s myar.py $TARGET $SOURCES',
+ ARCOM = r'%(_python_)s myar.py $TARGET $SOURCES',
ARCOMSTR = 'Archiving $TARGET from $SOURCES',
- RANLIBCOM = r'%s myranlib.py $TARGET',
+ RANLIBCOM = r'%(_python_)s myranlib.py $TARGET',
LIBPREFIX = '',
LIBSUFFIX = '.lib')
env.Library(target = 'output', source = ['file.1', 'file.2'])
-""" % (python, python))
+""" % locals())
test.write('file.1', "file.1\n/*ar*/\n")
test.write('file.2', "file.2\n/*ar*/\n")
diff --git a/test/AR/ARFLAGS.py b/test/AR/ARFLAGS.py
index 399170e..d4d122e 100644
--- a/test/AR/ARFLAGS.py
+++ b/test/AR/ARFLAGS.py
@@ -29,7 +29,7 @@ import string
import sys
import TestSCons
-python = TestSCons.python
+_python_ = TestSCons._python_
_exe = TestSCons._exe
test = TestSCons.TestSCons()
@@ -45,7 +45,7 @@ os.system(string.join(sys.argv[1:], " "))
test.write('SConstruct', """
foo = Environment(LIBS = ['foo'], LIBPATH = ['.'])
bar = Environment(LIBS = ['bar'], LIBPATH = ['.'],
- AR = '', ARFLAGS = foo.subst(r'%s wrapper.py $AR $ARFLAGS'))
+ AR = '', ARFLAGS = foo.subst(r'%(_python_)s wrapper.py $AR $ARFLAGS'))
foo.Library(target = 'foo', source = 'foo.c')
bar.Library(target = 'bar', source = 'bar.c')
@@ -53,9 +53,11 @@ obj = foo.Object('main', 'main.c')
foo.Program(target = 'f', source = obj)
bar.Program(target = 'b', source = obj)
-""" % python)
+""" % locals())
test.write('foo.c', r"""
+#include <stdio.h>
+
void
library_function(void)
{
@@ -64,6 +66,8 @@ library_function(void)
""")
test.write('bar.c', r"""
+#include <stdio.h>
+
void
library_function(void)
{
@@ -72,6 +76,8 @@ library_function(void)
""")
test.write('main.c', r"""
+#include <stdlib.h>
+
int
main(int argc, char *argv[])
{