Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75877 - in trunk/tools/build/v2/test: . direct-request-test
From: steven_at_[hidden]
Date: 2011-12-09 11:08:46


Author: steven_watanabe
Date: 2011-12-09 11:08:44 EST (Fri, 09 Dec 2011)
New Revision: 75877
URL: http://svn.boost.org/trac/boost/changeset/75877

Log:
Fix direct_request_test and add it to test_all.py.
Removed:
   trunk/tools/build/v2/test/direct-request-test/
Text files modified:
   trunk/tools/build/v2/test/direct_request_test.py | 47 ++++++++++++++++++++++++++++++++++-----
   trunk/tools/build/v2/test/test_all.py | 1
   2 files changed, 41 insertions(+), 7 deletions(-)

Modified: trunk/tools/build/v2/test/direct_request_test.py
==============================================================================
--- trunk/tools/build/v2/test/direct_request_test.py (original)
+++ trunk/tools/build/v2/test/direct_request_test.py 2011-12-09 11:08:44 EST (Fri, 09 Dec 2011)
@@ -4,9 +4,42 @@
 
 t = BoostBuild.Tester()
 
-
 # First check some startup.
-t.set_tree("direct-request-test")
+
+t.write("jamroot.jam", "")
+
+t.write("jamfile.jam", """
+exe a : a.cpp b ;
+lib b : b.cpp ;
+""")
+
+t.write("a.cpp", """
+void
+# ifdef _WIN32
+__declspec(dllimport)
+# endif
+foo();
+
+int main()
+{
+ foo();
+}
+""")
+
+t.write("b.cpp", """
+#ifdef MACROS
+void
+# ifdef _WIN32
+__declspec(dllexport)
+# endif
+foo() {}
+#endif
+
+# ifdef _WIN32
+int __declspec(dllexport) force_implib_creation;
+# endif
+""")
+
 t.run_build_system(extra_args="define=MACROS")
 t.expect_addition("bin/$toolset/debug/"
                   * (BoostBuild.List("a.obj b.obj b.dll a.exe")))
@@ -19,11 +52,11 @@
                   * (BoostBuild.List("a.obj b.obj b.dll a.exe")))
 
 
-# When building release version, the 'define' should not apply: we will have
-# direct build request 'release <define>MACROS' and a real build property
-# 'debug'.
-t.copy("jamfile2.jam", "jamfile.jam")
-t.copy("b_inverse.cpp", "b.cpp")
+# When building release version, the 'define' still applies.
+t.write("jamfile.jam", """
+exe a : a.cpp b : <variant>debug ;
+lib b : b.cpp ;
+""")
 t.rm("bin")
 t.run_build_system(extra_args="release define=MACROS")
 

Modified: trunk/tools/build/v2/test/test_all.py
==============================================================================
--- trunk/tools/build/v2/test/test_all.py (original)
+++ trunk/tools/build/v2/test/test_all.py 2011-12-09 11:08:44 EST (Fri, 09 Dec 2011)
@@ -158,6 +158,7 @@
 # "default_toolset",
           "dependency_property",
           "dependency_test",
+ "direct_request_test",
           "disambiguation",
           "dll_path",
           "double_loading",


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk