Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/tools/build/v2/test/m1-01.py @ 12

Last change on this file since 12 was 12, checked in by landauf, 18 years ago

added boost

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/usr/bin/python
2# Test the very basic 'make' functionality.
3
4from BoostBuild import Tester, List
5
6t = Tester()
7t.set_tree("test1")
8
9
10# Check that we can build something
11
12t.run_build_system("-sTOOLSET=yfc")
13
14t.expect_addition("bin/a.obj/yfc/debug/runtime-link-dynamic/a.obj")
15t.expect_addition("bin/a/yfc/debug/runtime-link-dynamic/a")
16t.expect_nothing_more()
17
18t.fail(t.read("bin/a.obj/yfc/debug/runtime-link-dynamic/a.obj") !=\
19"""
20<optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug
21a.cpp
22""")
23
24t.fail(t.read("bin/a/yfc/debug/runtime-link-dynamic/a") !=\
25"""
26<optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug
27<optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug
28a.cpp
29""")
30
31# Check that we have vanilla target names available
32
33t.touch("a.cpp")
34t.run_build_system("-sTOOLSET a.obj")
35t.expect_touch("bin/a.obj/yfc/debug/runtime-link-dynamic/a.obj")
36t.expect_no_modification("bin/a/yfc/debug/runtime-link-dynamic/a")
37
38
39# Check that if build request cannot be completely matches, a warning is
40# issued and subvariant with link-compatible properties is used
41
42t.write("Jamfile", t.read("Jamfile2"))
43stdout="""Warning: cannot exactly satisfy request for ./a with properties
44    <optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug
45Using
46    <optimization>space <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug
47instead.
48""")
49t.run_build_system("-sTOOLSET=yfc", stdout=stdout)
50
51# Check that conflicting link-incompatible requirements prevent building.
52t.write("Jamfile", t.read("Jamfile3"))
53stdout="""Warning: cannot satisfy request for ./a with properties
54    <optimization>off <rtti>on <runtime-link>dynamic <toolset>yfc <variant>debug
55Nothing will be built.
56""")
57t.run_build_system("-sTOOLSET=yfc", stdout=stdout, status=1)
58
59t.pass_test()
60
Note: See TracBrowser for help on using the repository browser.