summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/AR.py10
-rw-r--r--test/ARFLAGS.py10
-rw-r--r--test/CPPPATH.py6
-rw-r--r--test/HeaderGen.py5
-rw-r--r--test/HeaderInstall.py6
-rw-r--r--test/LIBPATH.py18
-rw-r--r--test/LIBPREFIXES.py6
-rw-r--r--test/LIBS.py14
-rw-r--r--test/LIBSUFFIXES.py6
-rw-r--r--test/Library.py10
-rw-r--r--test/QT.py12
-rw-r--r--test/QTFLAGS.py5
-rw-r--r--test/RANLIB.py10
-rw-r--r--test/RANLIBFLAGS.py10
-rw-r--r--test/Repository/StaticLibrary.py14
-rw-r--r--test/SharedLibrary.py16
-rw-r--r--test/long-lines.py6
-rw-r--r--test/scan-once.py6
18 files changed, 116 insertions, 54 deletions
diff --git a/test/AR.py b/test/AR.py
index f27aeb0..81a57b5 100644
--- a/test/AR.py
+++ b/test/AR.py
@@ -32,7 +32,7 @@ import TestSCons
python = TestSCons.python
_exe = TestSCons._exe
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.write("wrapper.py",
"""import os
@@ -82,11 +82,15 @@ main(int argc, char *argv[])
""")
-test.run(arguments = 'f' + _exe, stderr=TestSCons.noisy_ar)
+test.run(arguments = 'f' + _exe,
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.fail_test(os.path.exists(test.workpath('wrapper.out')))
-test.run(arguments = 'b' + _exe, stderr=TestSCons.noisy_ar)
+test.run(arguments = 'b' + _exe,
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.fail_test(test.read('wrapper.out') != "wrapper.py\n")
diff --git a/test/ARFLAGS.py b/test/ARFLAGS.py
index 15ce994..9a7e274 100644
--- a/test/ARFLAGS.py
+++ b/test/ARFLAGS.py
@@ -32,7 +32,7 @@ import TestSCons
python = TestSCons.python
_exe = TestSCons._exe
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.write("wrapper.py",
"""import os
@@ -82,11 +82,15 @@ main(int argc, char *argv[])
""")
-test.run(arguments = 'f' + _exe, stderr=TestSCons.noisy_ar)
+test.run(arguments = 'f' + _exe,
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.fail_test(os.path.exists(test.workpath('wrapper.out')))
-test.run(arguments = 'b' + _exe, stderr=TestSCons.noisy_ar)
+test.run(arguments = 'b' + _exe,
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.fail_test(test.read('wrapper.out') != "wrapper.py\n")
diff --git a/test/CPPPATH.py b/test/CPPPATH.py
index d3185c0..cb6969e 100644
--- a/test/CPPPATH.py
+++ b/test/CPPPATH.py
@@ -36,7 +36,7 @@ variant_prog = os.path.join('variant', 'prog' + _exe)
args = prog + ' ' + subdir_prog + ' ' + variant_prog
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.subdir('include', 'subdir', ['subdir', 'include'], 'inc2')
@@ -203,6 +203,8 @@ env.Library('foo', source = 'empty.c')
test.write('empty.c', """
""")
-test.run(arguments = '.', stderr=TestSCons.noisy_ar)
+test.run(arguments = '.',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.pass_test()
diff --git a/test/HeaderGen.py b/test/HeaderGen.py
index 44dd3ce..3cdd207 100644
--- a/test/HeaderGen.py
+++ b/test/HeaderGen.py
@@ -31,7 +31,7 @@ and that generated header files don't cause circular dependencies.
import TestSCons
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.write('SConstruct', """\
def writeFile(target, contents):
@@ -51,7 +51,8 @@ env.Command('gen.cpp', [],
lambda env,target,source: writeFile(target, '#include "gen.h"\\n'))
""")
-test.run(stderr=TestSCons.noisy_ar)
+test.run(stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.up_to_date(arguments = '.')
diff --git a/test/HeaderInstall.py b/test/HeaderInstall.py
index ae4213f..84a6a4a 100644
--- a/test/HeaderInstall.py
+++ b/test/HeaderInstall.py
@@ -31,7 +31,7 @@ import os.path
import TestSCons
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.subdir('work1', ['work1', 'dist'])
@@ -64,7 +64,9 @@ test.write(['work1', 'dist', 'h3.h'], """\
int foo = 3;
""")
-test.run(chdir = 'work1', arguments = ".", stderr=TestSCons.noisy_ar)
+test.run(chdir='work1', arguments=".",
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.up_to_date(chdir = 'work1', arguments = ".")
diff --git a/test/LIBPATH.py b/test/LIBPATH.py
index 9f5bbfd..b9318a0 100644
--- a/test/LIBPATH.py
+++ b/test/LIBPATH.py
@@ -33,7 +33,7 @@ _exe = TestSCons._exe
_dll = TestSCons._dll
dll_ = TestSCons.dll_
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.subdir('lib1', 'lib2')
@@ -86,7 +86,9 @@ main(int argc, char *argv[])
}
""")
-test.run(arguments = '.', stderr=TestSCons.noisy_ar)
+test.run(arguments = '.',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.run(program = prog1,
stdout = "f1.c\nprog.c\n")
@@ -107,7 +109,9 @@ f1(void)
}
""")
-test.run(arguments = '.', stderr=TestSCons.noisy_ar)
+test.run(arguments = '.',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.run(program = prog1,
stdout = "f1.c 1\nprog.c\n")
test.fail_test(oldtime2 == os.path.getmtime(prog2))
@@ -138,7 +142,9 @@ f1(void)
}
""")
-test.run(arguments = '.', stderr=TestSCons.noisy_ar)
+test.run(arguments = '.',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.run(program = prog1,
stdout = "f1.c 2\nprog.c\n")
@@ -154,6 +160,8 @@ env = Environment(LIBPATH = '')
env.Library('foo', source = 'empty.c')
""")
-test.run(arguments = '.', stderr=TestSCons.noisy_ar)
+test.run(arguments = '.',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.pass_test()
diff --git a/test/LIBPREFIXES.py b/test/LIBPREFIXES.py
index 7abf0d4..5ca427d 100644
--- a/test/LIBPREFIXES.py
+++ b/test/LIBPREFIXES.py
@@ -33,7 +33,7 @@ if sys.platform == 'win32':
else:
_lib = '.a'
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.write('SConstruct', """
env = Environment(LIBPREFIX = 'xxx-',
@@ -62,7 +62,9 @@ main(int argc, char *argv[])
}
""")
-test.run(arguments = '.', stderr=TestSCons.noisy_ar)
+test.run(arguments = '.',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.fail_test(not os.path.exists(test.workpath('xxx-foo' + _lib)))
diff --git a/test/LIBS.py b/test/LIBS.py
index 07f1746..cc31cad 100644
--- a/test/LIBS.py
+++ b/test/LIBS.py
@@ -34,7 +34,7 @@ else:
_exe = ''
bar_lib = 'libbar.a'
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.subdir('sub1', 'sub2')
@@ -148,7 +148,9 @@ SConscript('sub2/SConscript', 'env')
# on IRIX, ld32 prints out a warning saying that libbaz.a isn't used
sw = 'ld32: WARNING 84 : ./libbaz.a is not used for resolving any symbol.\n'
-test.run(arguments = '.', stderr='(%s|%s'%(sw, TestSCons.noisy_ar[1:]))
+test.run(arguments = '.',
+ stderr='(%s|%s'%(sw, TestSCons.noisy_ar[1:]),
+ match=TestSCons.match_re_dotall)
#test.fail_test(not test.stderr() in ['', sw])
test.run(program=foo1_exe, stdout='sub1/bar.c\nsub1/baz.c\n')
@@ -174,7 +176,9 @@ void baz()
}
""")
-test.run(arguments = '.', stderr='(%s|%s'%(sw, TestSCons.noisy_ar[1:]))
+test.run(arguments = '.',
+ stderr='(%s|%s'%(sw, TestSCons.noisy_ar[1:]),
+ match=TestSCons.match_re_dotall)
#test.fail_test(not test.stderr() in ['', sw, TestSCons.noisy_ar])
test.run(program=foo1_exe, stdout='sub1/bar.c\nsub1/baz.c 2\n')
@@ -251,7 +255,9 @@ int DisplayMessage2 (void)
}
""")
-test.run(arguments = '.', stderr=TestSCons.noisy_ar)
+test.run(arguments = '.',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.run(program=blender_exe,
stdout='src/component1/message.c\nsrc/component2/hello.c\n')
diff --git a/test/LIBSUFFIXES.py b/test/LIBSUFFIXES.py
index 4e0073e..e61096a 100644
--- a/test/LIBSUFFIXES.py
+++ b/test/LIBSUFFIXES.py
@@ -33,7 +33,7 @@ if sys.platform == 'win32':
else:
lib_ = 'lib'
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.write('SConstruct', """
env = Environment(LIBSUFFIX = '.xxx',
@@ -62,7 +62,9 @@ main(int argc, char *argv[])
}
""")
-test.run(arguments = '.', stderr=TestSCons.noisy_ar)
+test.run(arguments = '.',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.fail_test(not os.path.exists(test.workpath(lib_ + 'foo.xxx')))
diff --git a/test/Library.py b/test/Library.py
index 2b0810f..f089e0c 100644
--- a/test/Library.py
+++ b/test/Library.py
@@ -26,7 +26,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.write('SConstruct', """
env = Environment(LIBS = [ 'foo1', 'libfoo2' ],
@@ -121,7 +121,9 @@ main(int argc, char *argv[])
}
""")
-test.run(arguments = '.', stderr=TestSCons.noisy_ar)
+test.run(arguments = '.',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.run(program = test.workpath('prog'),
stdout = "f1.c\nf2a.c\nf2b.c\nf2c.c\nf3a.c\nf3b.c\nf3c.cpp\nprog.c\n")
@@ -150,7 +152,9 @@ int main() {
}
""")
-test.run(stderr=TestSCons.noisy_ar)
+test.run(stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
+
test.run(program = test.workpath('uses-nrd'),
stdout = "nrd\n")
diff --git a/test/QT.py b/test/QT.py
index c5f32fb..4879432 100644
--- a/test/QT.py
+++ b/test/QT.py
@@ -43,7 +43,7 @@ dll_ = TestSCons.dll_
_dll = TestSCons._dll
_shobj = TestSCons._shobj
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.subdir( 'qt', ['qt', 'bin'], ['qt', 'include'], ['qt', 'lib'] )
@@ -127,7 +127,8 @@ env.StaticLibrary( 'myqt', 'my_qobject.cpp' )
""")
test.run(chdir=test.workpath('qt','lib'), arguments = '.',
- stderr=TestSCons.noisy_ar)
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
QT = test.workpath('qt')
QT_LIB = 'myqt'
@@ -311,7 +312,9 @@ void useit() {
}
""")
-test.run(chdir='work3', arguments = lib_aaa, stderr=TestSCons.noisy_ar)
+test.run(chdir='work3', arguments = lib_aaa,
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.up_to_date(chdir='work3', options = '-n', arguments = lib_aaa)
test.write(['work3', 'aaa.cpp'], r"""
#include "my_qobject.h"
@@ -324,7 +327,8 @@ test.not_up_to_date(chdir='work3', options = '-n', arguments = moc)
test.run(chdir='work3',
arguments = "build_dir=1 " +
test.workpath('work3', 'build', lib_aaa),
- stderr=TestSCons.noisy_ar )
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.run(chdir='work3',
arguments = "build_dir=1 chdir=1 " +
test.workpath('work3', 'build', lib_aaa) )
diff --git a/test/QTFLAGS.py b/test/QTFLAGS.py
index 3563d37..a503fad 100644
--- a/test/QTFLAGS.py
+++ b/test/QTFLAGS.py
@@ -34,7 +34,7 @@ import os.path
python = TestSCons.python
_exe = TestSCons._exe
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.subdir( 'qt', ['qt', 'bin'], ['qt', 'include'], ['qt', 'lib'] )
@@ -117,7 +117,8 @@ env.StaticLibrary( 'myqt', 'my_qobject.cpp' )
""")
test.run(chdir=test.workpath('qt','lib'), arguments = '.',
- stderr=TestSCons.noisy_ar)
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
QT = test.workpath('qt')
QT_LIB = 'myqt'
diff --git a/test/RANLIB.py b/test/RANLIB.py
index 5de4a09..cf4ae78 100644
--- a/test/RANLIB.py
+++ b/test/RANLIB.py
@@ -34,7 +34,7 @@ python = TestSCons.python
_exe = TestSCons._exe
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
ranlib = test.detect('RANLIB', 'ranlib')
@@ -89,11 +89,15 @@ main(int argc, char *argv[])
""")
-test.run(arguments = 'f' + _exe, stderr=TestSCons.noisy_ar)
+test.run(arguments = 'f' + _exe,
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.fail_test(os.path.exists(test.workpath('wrapper.out')))
-test.run(arguments = 'b' + _exe, stderr=TestSCons.noisy_ar)
+test.run(arguments = 'b' + _exe,
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.fail_test(test.read('wrapper.out') != "wrapper.py\n")
diff --git a/test/RANLIBFLAGS.py b/test/RANLIBFLAGS.py
index 64c6847..d6c25a8 100644
--- a/test/RANLIBFLAGS.py
+++ b/test/RANLIBFLAGS.py
@@ -32,7 +32,7 @@ import TestSCons
python = TestSCons.python
_exe = TestSCons._exe
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
ranlib = test.detect('RANLIB', 'ranlib')
@@ -86,11 +86,15 @@ main(int argc, char *argv[])
""")
-test.run(arguments = 'f' + _exe, stderr=TestSCons.noisy_ar)
+test.run(arguments = 'f' + _exe,
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.fail_test(os.path.exists(test.workpath('wrapper.out')))
-test.run(arguments = 'b' + _exe, stderr=TestSCons.noisy_ar)
+test.run(arguments = 'b' + _exe,
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.fail_test(test.read('wrapper.out') != "wrapper.py\n")
diff --git a/test/Repository/StaticLibrary.py b/test/Repository/StaticLibrary.py
index 2dd8f88..f104448 100644
--- a/test/Repository/StaticLibrary.py
+++ b/test/Repository/StaticLibrary.py
@@ -37,7 +37,7 @@ else:
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
#
test.subdir('repository', 'work1', 'work2', 'work3')
@@ -101,7 +101,8 @@ test.writable('repository', 0)
#
test.run(chdir = 'work1', options = opts, arguments = ".",
- stderr=TestSCons.noisy_ar)
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.run(program = work1_foo, stdout =
"""repository/aaa.c
@@ -125,7 +126,8 @@ bbb(void)
""")
test.run(chdir = 'work1', options = opts, arguments = ".",
- stderr=TestSCons.noisy_ar)
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.run(program = work1_foo, stdout =
"""repository/aaa.c
@@ -144,7 +146,8 @@ test.up_to_date(chdir = 'work1', options = opts, arguments = ".")
test.writable('repository', 1)
test.run(chdir = 'repository', options = opts, arguments = ".",
- stderr=TestSCons.noisy_ar)
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.run(program = repository_foo, stdout =
"""repository/aaa.c
@@ -173,7 +176,8 @@ bbb(void)
""")
test.run(chdir = 'work2', options = opts, arguments = ".",
- stderr=TestSCons.noisy_ar)
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.run(program = work2_foo, stdout =
"""repository/aaa.c
diff --git a/test/SharedLibrary.py b/test/SharedLibrary.py
index d4eb730..185cf9f 100644
--- a/test/SharedLibrary.py
+++ b/test/SharedLibrary.py
@@ -31,7 +31,7 @@ import sys
import TestCmd
import TestSCons
-test = TestSCons.TestSCons(match=TestCmd.match_re_dotall)
+test = TestSCons.TestSCons()
test.write('SConstruct', """
import sys
@@ -191,7 +191,9 @@ main(int argc, char *argv[])
}
""")
-test.run(arguments = '.', stderr=TestSCons.noisy_ar)
+test.run(arguments = '.',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
if os.name == 'posix':
os.environ['LD_LIBRARY_PATH'] = '.'
@@ -206,14 +208,18 @@ if sys.platform == 'win32' or string.find(sys.platform, 'irix') != -1:
else:
test.run(arguments = '-f SConstructFoo', status=2, stderr='''\
scons: \*\*\* Source file: foo\..* is static and is not compatible with shared target: .*
-''')
+''',
+ match=TestSCons.match_re_dotall)
# Run it again to make sure that we still get the error
# even though the static objects already exist.
test.run(arguments = '-f SConstructFoo', status=2, stderr='''\
scons: \*\*\* Source file: foo\..* is static and is not compatible with shared target: .*
-''')
+''',
+ match=TestSCons.match_re_dotall)
-test.run(arguments = '-f SConstructFoo2', stderr=TestSCons.noisy_ar)
+test.run(arguments = '-f SConstructFoo2',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
if sys.platform == 'win32':
# Make sure we don't insert a .def source file (when
diff --git a/test/long-lines.py b/test/long-lines.py
index 5216429..a883e37 100644
--- a/test/long-lines.py
+++ b/test/long-lines.py
@@ -30,7 +30,7 @@ import string
import sys
import TestSCons
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
if sys.platform == 'win32':
lib_static_lib = 'static.lib'
@@ -103,7 +103,9 @@ main(int argc, char *argv[])
""")
-test.run(arguments = '.', stderr=TestSCons.noisy_ar)
+test.run(arguments = '.',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
test.up_to_date(arguments = '.')
diff --git a/test/scan-once.py b/test/scan-once.py
index 57a8d36..0d1dd2a 100644
--- a/test/scan-once.py
+++ b/test/scan-once.py
@@ -43,7 +43,7 @@ import sys
import TestCmd
import TestSCons
-test = TestSCons.TestSCons(match=TestSCons.match_re_dotall)
+test = TestSCons.TestSCons()
test.subdir('simple',
'SLF',
@@ -474,7 +474,9 @@ XScanner: node = file3.x
create file4.x from file3.x
"""))
-test.run(arguments = 'SLF', stderr=TestSCons.noisy_ar)
+test.run(arguments = 'SLF',
+ stderr=TestSCons.noisy_ar,
+ match=TestSCons.match_re_dotall)
# XXX Note that the generated .h files still get scanned twice,
# once before they're generated and once after. That's the