summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ARGLIST.py2
-rw-r--r--test/Actions/pre-post.py22
-rw-r--r--test/AddMethod.py8
-rw-r--r--test/AddOption/basic.py4
-rw-r--r--test/CC/CFLAGS.py10
-rw-r--r--test/packaging/convenience-functions/image/SConstruct5
6 files changed, 26 insertions, 25 deletions
diff --git a/test/ARGLIST.py b/test/ARGLIST.py
index 186ad06..e246ba3 100644
--- a/test/ARGLIST.py
+++ b/test/ARGLIST.py
@@ -31,7 +31,7 @@ test = TestSCons.TestSCons()
test.write('SConstruct', """
i = 0
for key, value in ARGLIST:
- print "%d: %s = %s" % (i, key, value)
+ print("%d: %s = %s" % (i, key, value))
i = i + 1
""")
diff --git a/test/Actions/pre-post.py b/test/Actions/pre-post.py
index e09ee02..179e914 100644
--- a/test/Actions/pre-post.py
+++ b/test/Actions/pre-post.py
@@ -118,14 +118,14 @@ def b(target, source, env):
env1 = Environment(X='111')
env2 = Environment(X='222')
B = Builder(action = b, env = env1, multi=1)
-print "B =", B
-print "B.env =", B.env
+print("B =", B)
+print("B.env =", B.env)
env1.Append(BUILDERS = {'B' : B})
env2.Append(BUILDERS = {'B' : B})
env3 = env1.Clone(X='333')
-print "env1 =", env1
-print "env2 =", env2
-print "env3 =", env3
+print("env1 =", env1)
+print("env2 =", env2)
+print("env3 =", env3)
f1 = env1.B(File('file1.out'), [])
f2 = env2.B('file2.out', [])
f3 = env3.B('file3.out', [])
@@ -133,12 +133,12 @@ def do_nothing(env, target, source):
pass
AddPreAction(f2[0], do_nothing)
AddPostAction(f3[0], do_nothing)
-print "f1[0].builder =", f1[0].builder
-print "f2[0].builder =", f2[0].builder
-print "f3[0].builder =", f3[0].builder
-print "f1[0].env =", f1[0].env
-print "f2[0].env =", f2[0].env
-print "f3[0].env =", f3[0].env
+print("f1[0].builder =", f1[0].builder)
+print("f2[0].builder =", f2[0].builder)
+print("f3[0].builder =", f3[0].builder)
+print("f1[0].env =", f1[0].env)
+print("f2[0].env =", f2[0].env)
+print("f3[0].env =", f3[0].env)
""")
test.run(chdir='work2', arguments = '.')
diff --git a/test/AddMethod.py b/test/AddMethod.py
index af84cb3..6049ae2 100644
--- a/test/AddMethod.py
+++ b/test/AddMethod.py
@@ -40,10 +40,10 @@ def foo(self):
AddMethod(Environment, foo)
env = Environment(FOO = '111')
-print env.foo()
+print(env.foo())
env = Environment(FOO = '222')
-print env.foo()
+print(env.foo())
env.AddMethod(foo, 'bar')
env['FOO'] = '333'
@@ -51,8 +51,8 @@ env['FOO'] = '333'
e = env.Clone()
e['FOO'] = '444'
-print env.bar()
-print e.bar()
+print(env.bar())
+print(e.bar())
""")
expect = """\
diff --git a/test/AddOption/basic.py b/test/AddOption/basic.py
index a1bb7b3..b1b8f2e 100644
--- a/test/AddOption/basic.py
+++ b/test/AddOption/basic.py
@@ -48,8 +48,8 @@ AddOption('--prefix',
f = GetOption('force')
if f:
f = "True"
-print f
-print GetOption('prefix')
+print(f)
+print(GetOption('prefix'))
""")
test.run('-Q -q .',
diff --git a/test/CC/CFLAGS.py b/test/CC/CFLAGS.py
index 6ea87ad..590d6b5 100644
--- a/test/CC/CFLAGS.py
+++ b/test/CC/CFLAGS.py
@@ -32,10 +32,10 @@ test = TestSCons.TestSCons()
# Make sure CFLAGS is not passed to CXX by just expanding CXXCOM
test.write('SConstruct', """
env = Environment(CFLAGS='-xyz', CCFLAGS='-abc')
-print env.subst('$CXXCOM')
-print env.subst('$CXXCOMSTR')
-print env.subst('$SHCXXCOM')
-print env.subst('$SHCXXCOMSTR')
+print(env.subst('$CXXCOM'))
+print(env.subst('$CXXCOMSTR'))
+print(env.subst('$SHCXXCOM'))
+print(env.subst('$SHCXXCOMSTR'))
""")
test.run(arguments = '.')
test.must_not_contain_any_line(test.stdout(), ["-xyz"])
@@ -46,7 +46,7 @@ _obj = TestSCons._obj
# Test passing CFLAGS to C compiler by actually compiling programs
if sys.platform == 'win32':
import SCons.Tool.MSCommon as msc
-
+
if not msc.msvc_exists():
fooflags = '-DFOO'
barflags = '-DBAR'
diff --git a/test/packaging/convenience-functions/image/SConstruct b/test/packaging/convenience-functions/image/SConstruct
index 461961e..f35c3e3 100644
--- a/test/packaging/convenience-functions/image/SConstruct
+++ b/test/packaging/convenience-functions/image/SConstruct
@@ -1,3 +1,4 @@
+from __future__ import print_function
env = Environment(tools=['default', 'packaging'])
prog = env.Install( 'bin/', ["f1", "f2"] )
@@ -6,5 +7,5 @@ env.File( "f3" )
src_files = sorted(map(str, env.FindSourceFiles()))
oth_files = sorted(map(str, env.FindInstalledFiles()))
-print src_files
-print oth_files
+print(src_files)
+print(oth_files)