From 48d0100e2e0f458970e78a97c77cacb2f3f55086 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Tue, 25 Apr 2006 16:17:10 +0000 Subject: [PATCH] Merge from trunk. [SVN r33816] --- test/BoostBuild.py | 3 ++- test/alternatives.py | 4 ++-- test/example_libraries.py | 2 +- test/implicit_dependency.py | 17 ++++++++++++++--- test/library_chain.py | 10 ++++++---- test/searched_lib.py | 3 ++- 6 files changed, 27 insertions(+), 12 deletions(-) diff --git a/test/BoostBuild.py b/test/BoostBuild.py index 070f97e14..239f76975 100644 --- a/test/BoostBuild.py +++ b/test/BoostBuild.py @@ -370,7 +370,7 @@ class Tester(TestCmd.TestCmd): if condition and dump_stdio: self.dump_stdio() - if '--preserve' in sys.argv: + if condition and '--preserve' in sys.argv: print print "*** Copying the state of working dir into 'failed_test' ***" print @@ -479,6 +479,7 @@ class Tester(TestCmd.TestCmd): self.ignore('*.pdb') # msvc program database files self.ignore('*.rsp') # response files self.ignore('*.tds') # borland debug symbols + self.ignore('*.manifest') # msvc DLL manifests # debug builds of bjam built with gcc produce this profiling data self.ignore('gmon.out') diff --git a/test/alternatives.py b/test/alternatives.py index 5c5ada90e..0c1d91abb 100644 --- a/test/alternatives.py +++ b/test/alternatives.py @@ -85,7 +85,7 @@ t.write("Jamfile", """ exe a : a_empty.cpp ; exe a : a.cpp ; """) -t.run_build_system("--no-error-backtrace", status=1) +t.run_build_system("--no-error-backtrace", status=None) t.fail_test(find(t.stdout(), "No best alternative") == -1) # Another ambiguity test: two matches properties in one alternative are @@ -95,7 +95,7 @@ exe a : a_empty.cpp : off off ; exe a : a.cpp : on ; """) -t.run_build_system("--no-error-backtrace", status=1) +t.run_build_system("--no-error-backtrace", status=None) t.fail_test(find(t.stdout(), "No best alternative") == -1) diff --git a/test/example_libraries.py b/test/example_libraries.py index 21421f685..2d2d468e2 100644 --- a/test/example_libraries.py +++ b/test/example_libraries.py @@ -15,7 +15,7 @@ t.set_tree("../example/libraries") t.run_build_system() -t.expect_addition(["app/bin/$toolset/debug/app", +t.expect_addition(["app/bin/$toolset/debug/app.exe", "util/foo/bin/$toolset/debug/bar.dll"]) diff --git a/test/implicit_dependency.py b/test/implicit_dependency.py index f7ff01789..5fecdd23a 100644 --- a/test/implicit_dependency.py +++ b/test/implicit_dependency.py @@ -20,10 +20,21 @@ explicit a.h ; exe hello : hello.cpp : a.h ; -actions gen-header +import os ; +if [ os.name ] = NT { - echo "int i;" > $(<) -} + actions gen-header + { + echo int i; > $(<) + } +} +else +{ + actions gen-header + { + echo "int i;" > $(<) + } +} """) t.write("hello.cpp", """ diff --git a/test/library_chain.py b/test/library_chain.py index a78c681ef..f98de9646 100644 --- a/test/library_chain.py +++ b/test/library_chain.py @@ -7,7 +7,7 @@ # Test that a chain of libraries work ok, not matter if we use static or # shared linking. -from BoostBuild import Tester, List +from BoostBuild import Tester, List, get_toolset import string import os @@ -96,7 +96,7 @@ exe main : main.cpp png ; lib png : z : png ; lib z : : zzz ; """) -t.run_build_system("-a -d+2", status=1, stderr=None) +t.run_build_system("-a -d+2", status=None, stderr=None) # Try to find the "zzz" string either in response file # (for Windows compilers), or in standard output. rsp = t.adjust_names("bin/$toolset/debug/main.exe.rsp")[0] @@ -125,8 +125,10 @@ void a() {} t.run_build_system(subdir="a") t.expect_addition("a/bin/$toolset/debug/a.dll") -# FIXME: for Windows, need to link to .lib, not .dll! -file = t.adjust_names(["a/bin/$toolset/debug/a.dll"])[0] +if (os.name == 'nt' or os.uname()[0].lower().startswith('cygwin')) and get_toolset() != 'gcc': + file = t.adjust_names(["a/bin/$toolset/debug/a.lib"])[0] +else: + file = t.adjust_names(["a/bin/$toolset/debug/a.dll"])[0] t.write("b/Jamfile", """ lib b : b.cpp ../%s ; diff --git a/test/searched_lib.py b/test/searched_lib.py index 8de51dcaf..353d21dea 100644 --- a/test/searched_lib.py +++ b/test/searched_lib.py @@ -26,6 +26,7 @@ t.expect_addition("lib/bin/$toolset/debug/test_lib.dll") # if (os.name == 'nt' or os.uname()[0].lower().startswith('cygwin')) and get_toolset() != 'gcc': t.copy("lib/bin/$toolset/debug/test_lib.lib", "lib/test_lib.lib") + t.copy("lib/bin/$toolset/debug/test_lib.dll", "lib/test_lib.dll") else: t.copy("lib/bin/$toolset/debug/test_lib.dll", "lib/test_lib.dll") @@ -61,7 +62,7 @@ t.run_build_system() t.expect_addition("bin/$toolset/debug/main.exe") t.rm("bin/$toolset/debug/main.exe") -# Test the 'unit-test' will correctly add runtime paths +# Test that 'unit-test' will correctly add runtime paths # to searched libraries. t.write('Jamfile', """