Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/build_file.py @ 29

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

updated boost from 1_33_1 to 1_34_1

File size: 967 bytes
Line 
1#!/usr/bin/python
2
3#  Copyright (C) Vladimir Prus 2006.
4#  Distributed under the Boost Software License, Version 1.0. (See
5#  accompanying file LICENSE_1_0.txt or copy at
6#  http://www.boost.org/LICENSE_1_0.txt)
7
8#  Tests that we can build a file (not target), by it's name
9from BoostBuild import Tester, List
10from string import find
11
12# Create a temporary working directory
13t = Tester()
14
15# Create the needed files
16t.write("Jamroot", """
17exe hello : hello.cpp ;
18build-project sub ;
19""")
20t.write("hello.cpp", """
21int main()
22{
23    return 0;
24}
25""")
26t.write("sub/Jamfile", """
27exe hello : hello.cpp ;
28exe sub : hello.cpp ;
29""")
30t.write("sub/hello.cpp", """
31int main()
32{
33    return 0;
34}
35""")
36
37
38t.run_build_system(t.adjust_suffix("hello.obj"))
39
40t.fail_test(find(t.stdout(), "depends on itself") != -1)
41t.expect_addition("bin/$toolset/debug/hello.obj")
42t.expect_addition("sub/bin/$toolset/debug/hello.obj")
43t.expect_nothing_more()
44
45# Remove temporary directories
46t.cleanup()
Note: See TracBrowser for help on using the repository browser.