Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/m1-01.py @ 32

Last change on this file since 32 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

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