summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/engine/SCons/ActionTests.py4
-rw-r--r--src/engine/SCons/EnvironmentTests.py4
-rw-r--r--test/AS/ASCOM.py1
-rw-r--r--test/AS/ASPPCOM.py1
-rw-r--r--test/Actions/function.py29
-rw-r--r--test/CPPFLAGS.py35
-rw-r--r--test/CPPPATH/match-dir.py7
7 files changed, 50 insertions, 31 deletions
diff --git a/src/engine/SCons/ActionTests.py b/src/engine/SCons/ActionTests.py
index ae909a8..02407cc 100644
--- a/src/engine/SCons/ActionTests.py
+++ b/src/engine/SCons/ActionTests.py
@@ -1128,6 +1128,10 @@ class CommandActionTestCase(unittest.TestCase):
# Newer cygwin seems to return 126 for following
expect_nonexecutable_file = 126
expect_nonexecutable_dir = 127
+ elif sys.platform.find('sunos') != -1:
+ expect_nonexistent = 1
+ expect_nonexecutable_file = 1
+ expect_nonexecutable_dir = 1
else:
expect_nonexistent = 127
expect_nonexecutable_file = 126
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 3f70514..ec69607 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -1280,7 +1280,7 @@ env4.builder1.env, env3)
env.fs.Repository('/rep1')
env.fs.Repository('/rep2')
- env.Replace(CPPPATH = [ 'foo', '/a/b', '$FOO/bar', blat],
+ env.Replace(CPPPATH = [ 'foo', '/__a__/b', '$FOO/bar', blat],
INCPREFIX = '-I ',
INCSUFFIX = 'XXX',
FOO = 'baz')
@@ -1289,7 +1289,7 @@ env4.builder1.env, env3)
'-I', normalize_path('xx/fooXXX'),
'-I', normalize_path('/rep1/xx/fooXXX'),
'-I', normalize_path('/rep2/xx/fooXXX'),
- '-I', normalize_path('/a/bXXX'),
+ '-I', normalize_path('/__a__/bXXX'),
'-I', normalize_path('xx/baz/barXXX'),
'-I', normalize_path('/rep1/xx/baz/barXXX'),
'-I', normalize_path('/rep2/xx/baz/barXXX'),
diff --git a/test/AS/ASCOM.py b/test/AS/ASCOM.py
index a874f32..568bd00 100644
--- a/test/AS/ASCOM.py
+++ b/test/AS/ASCOM.py
@@ -57,6 +57,7 @@ else:
test.write('SConstruct', """
env = Environment(ASCOM = r'%(_python_)s myas.py $TARGET $SOURCE',
OBJSUFFIX = '.obj',
+ SHOBJPREFIX = '',
SHOBJSUFFIX = '.shobj')
env.Object(target = 'test1', source = 'test1.s')
env.Object(target = 'test2', source = 'test2%(alt_s_suffix)s')
diff --git a/test/AS/ASPPCOM.py b/test/AS/ASPPCOM.py
index 73b3ec3..f89306e 100644
--- a/test/AS/ASPPCOM.py
+++ b/test/AS/ASPPCOM.py
@@ -48,6 +48,7 @@ sys.exit(0)
test.write('SConstruct', """
env = Environment(ASPPCOM = r'%(_python_)s myas.py $TARGET $SOURCE',
OBJSUFFIX = '.obj',
+ SHOBJPREFIX = '',
SHOBJSUFFIX = '.shobj')
env.Object(target = 'test1', source = 'test1.spp')
env.Object(target = 'test2', source = 'test2.SPP')
diff --git a/test/Actions/function.py b/test/Actions/function.py
index 4bde525..02dbcc7 100644
--- a/test/Actions/function.py
+++ b/test/Actions/function.py
@@ -24,6 +24,8 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+import sys
+
import TestSCons
_python_ = TestSCons._python_
@@ -171,57 +173,58 @@ def runtest(arguments, expectedOutFile, expectedRebuild=True, stderr=""):
test.must_match('Out.gen.h', expectedOutFile)
-# Original build.
+# We're making this script chatty to prevent timeouts on really really
+# slow buildbot slaves (*cough* Solaris *cough*).
+
+sys.stdout.write('Original build.\n')
runtest('', """Head:0:1:Tail\n18\naaa\n""")
-# Changing a docstring should not cause a rebuild
+sys.stdout.write('Changing a docstring should not cause a rebuild.\n')
runtest('docstring=ThisBuilderDoesXAndY', """Head:0:1:Tail\n18\naaa\n""", False)
runtest('docstring=SuperBuilder', """Head:0:1:Tail\n18\naaa\n""", False)
runtest('docstring=', """Head:0:1:Tail\n18\naaa\n""", False)
-# Changing a variable listed in the varlist should cause a rebuild
+sys.stdout.write('Changing a variable in the varlist should cause a rebuild.\n')
runtest('NbDeps=3', """Head:0:1:2:Tail\n18\naaa\n""")
runtest('NbDeps=4', """Head:0:1:2:3:Tail\n18\naaa\n""")
runtest('', """Head:0:1:Tail\n18\naaa\n""")
-# Changing the function code should cause a rebuild
+sys.stdout.write('Changing the function code should cause a rebuild.\n')
runtest('extracode=f.write("XX\\n")', """Head:0:1:Tail\n18\naaa\nXX\n""")
runtest('extracode=a=2', """Head:0:1:Tail\n18\naaa\n""")
runtest('', """Head:0:1:Tail\n18\naaa\n""")
-# Changing a constant used in the function code should cause a rebuild
+sys.stdout.write('Changing a constant in the function code should cause a rebuild.\n')
runtest('separator=,', """Head:0,1,Tail\n18\naaa\n""")
runtest('separator=;', """Head:0;1;Tail\n18\naaa\n""")
runtest('', """Head:0:1:Tail\n18\naaa\n""")
-# Changing the code of a nested function should cause a rebuild
+sys.stdout.write('Changing the code of a nested function should cause a rebuild.\n')
runtest('nestedfuncexp=b-xxx', """Head:0:1:Tail\n-18\naaa\n""")
runtest('nestedfuncexp=b+xxx', """Head:0:1:Tail\n32\naaa\n""")
runtest('', """Head:0:1:Tail\n18\naaa\n""")
-# Adding an extra argument should cause a rebuild.
+sys.stdout.write('Adding an extra argument should cause a rebuild.\n')
runtest('extraarg=,xarg=2', """Head:0:1:Tail\n18\naaa\n2\n""")
runtest('extraarg=,xarg=5', """Head:0:1:Tail\n18\naaa\n5\n""")
runtest('', """Head:0:1:Tail\n18\naaa\n""")
-# Changing the value of a default argument should cause a rebuild
-# case 1: a value
+sys.stdout.write('Changing the value of a default argument should cause a rebuild: a value.\n')
runtest('b=0', """Head:0:1:Tail\n25\naaa\n""")
runtest('b=9', """Head:0:1:Tail\n16\naaa\n""")
runtest('', """Head:0:1:Tail\n18\naaa\n""")
-# case 2: an object
+sys.stdout.write('Changing the value of a default argument should cause a rebuild: an object.\n')
runtest('regexp=(aaaa)', """Head:0:1:Tail\n18\naaaa\n""")
runtest('regexp=aa(a+)', """Head:0:1:Tail\n18\naa\n""")
runtest('', """Head:0:1:Tail\n18\naaa\n""")
-# Changing the value of a closure cell value should cause a rebuild
-# case 1: a value
+sys.stdout.write('Changing the value of a closure cell value should cause a rebuild: a value.\n')
runtest('closure_cell_value=32', """Head:0:1:Tail\n25\naaa\n""")
runtest('closure_cell_value=7', """Head:0:1:Tail\n0\naaa\n""")
runtest('', """Head:0:1:Tail\n18\naaa\n""")
-# case 2: a default argument
+sys.stdout.write('Changing the value of a closure cell value should cause a rebuild: a default argument.\n')
runtest('header=MyHeader:', """MyHeader:0:1:Tail\n18\naaa\n""")
runtest('trailer=MyTrailer', """Head:0:1:MyTrailer\n18\naaa\n""")
runtest('', """Head:0:1:Tail\n18\naaa\n""")
diff --git a/test/CPPFLAGS.py b/test/CPPFLAGS.py
index 346b422..216984a 100644
--- a/test/CPPFLAGS.py
+++ b/test/CPPFLAGS.py
@@ -29,9 +29,6 @@ import sys
import TestSCons
_python_ = TestSCons._python_
-_exe = TestSCons._exe
-_obj = TestSCons._obj
-_shobj = TestSCons._shobj
test = TestSCons.TestSCons()
@@ -85,7 +82,7 @@ import os
import sys
compiler = sys.argv[1]
clen = len(compiler) + 1
-opts, args = getopt.getopt(sys.argv[2:], 'co:xf:')
+opts, args = getopt.getopt(sys.argv[2:], 'co:xf:K:')
for opt, arg in opts:
if opt == '-o': out = arg
elif opt == '-x': open('mygcc.out', 'ab').write(compiler + "\n")
@@ -104,7 +101,9 @@ env = Environment(CPPFLAGS = '-x',
CC = r'%(_python_)s mygcc.py cc',
CXX = r'%(_python_)s mygcc.py c++',
CXXFLAGS = [],
- FORTRAN = r'%(_python_)s mygcc.py g77')
+ FORTRAN = r'%(_python_)s mygcc.py g77',
+ OBJSUFFIX = '.obj',
+ PROGSUFFIX = '.exe')
env.Program(target = 'foo', source = Split('test1.c test2.cpp test3.F'))
""" % locals())
@@ -125,10 +124,10 @@ test.write('test3.F', r"""test3.F
test.run(arguments = '.', stderr=None)
-test.must_match('test1' + _obj, "test1.c\n#link\n")
-test.must_match('test2' + _obj, "test2.cpp\n#link\n")
-test.must_match('test3' + _obj, "test3.F\n#link\n")
-test.must_match('foo' + _exe, "test1.c\ntest2.cpp\ntest3.F\n")
+test.must_match('test1.obj', "test1.c\n#link\n")
+test.must_match('test2.obj', "test2.cpp\n#link\n")
+test.must_match('test3.obj', "test3.F\n#link\n")
+test.must_match('foo.exe', "test1.c\ntest2.cpp\ntest3.F\n")
if TestSCons.case_sensitive_suffixes('.F', '.f'):
test.must_match('mygcc.out', "cc\nc++\ng77\n")
else:
@@ -141,7 +140,11 @@ env = Environment(CPPFLAGS = '-x',
CC = r'%(_python_)s mygcc.py cc',
CXX = r'%(_python_)s mygcc.py c++',
CXXFLAGS = [],
- FORTRAN = r'%(_python_)s mygcc.py g77')
+ FORTRAN = r'%(_python_)s mygcc.py g77',
+ OBJSUFFIX = '.obj',
+ SHOBJPREFIX = '',
+ SHOBJSUFFIX = '.shobj',
+ PROGSUFFIX = '.exe')
env.SharedLibrary(target = File('foo.bar'),
source = Split('test1.c test2.cpp test3.F'))
""" % locals())
@@ -162,15 +165,15 @@ test.write('test3.F', r"""test3.F
""")
test.unlink('mygcc.out')
-test.unlink('test1' + _obj)
-test.unlink('test2' + _obj)
-test.unlink('test3' + _obj)
+test.unlink('test1.obj')
+test.unlink('test2.obj')
+test.unlink('test3.obj')
test.run(arguments = '.', stderr = None)
-test.must_match('test1' + _shobj, "test1.c\n#link\n")
-test.must_match('test2' + _shobj, "test2.cpp\n#link\n")
-test.must_match('test3' + _shobj, "test3.F\n#link\n")
+test.must_match('test1.shobj', "test1.c\n#link\n")
+test.must_match('test2.shobj', "test2.cpp\n#link\n")
+test.must_match('test3.shobj', "test3.F\n#link\n")
test.must_match('foo.bar', "test1.c\ntest2.cpp\ntest3.F\n")
if TestSCons.case_sensitive_suffixes('.F', '.f'):
test.must_match('mygcc.out', "cc\nc++\ng77\n")
diff --git a/test/CPPPATH/match-dir.py b/test/CPPPATH/match-dir.py
index e1d2604..6ec30b4 100644
--- a/test/CPPPATH/match-dir.py
+++ b/test/CPPPATH/match-dir.py
@@ -29,10 +29,17 @@ Verify that we don't blow up if there's a directory name within
$CPPPATH that matches a #include file name.
"""
+import sys
+
import TestSCons
test = TestSCons.TestSCons()
+# TODO(sgk): get this to work everywhere by using fake compilers
+if sys.platform.find('sunos') != -1:
+ msg = 'SunOS C compiler does not handle this case; skipping test.\n'
+ test.skip_test(msg)
+
test.subdir(['src'],
['src', 'inc'],
['src', 'inc', 'inc2'])