Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/make_rule.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: 1.4 KB
Line 
1#!/usr/bin/python
2
3# Copyright 2003 Dave Abrahams
4# Copyright 2003, 2006 Vladimir Prus
5# Distributed under the Boost Software License, Version 1.0.
6# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7
8# Test the 'make' rule
9
10from BoostBuild import Tester
11from string import find
12
13t = Tester(pass_toolset=1)
14
15t.write("Jamroot", """
16
17import feature ;
18feature.feature test_feature : : free ;
19
20import toolset ;
21toolset.flags creator STRING : <test_feature> ;
22
23actions creator
24{
25    echo $(STRING) > $(<)
26}
27
28make foo.bar : : creator : <test_feature>12345678 ;
29""")
30
31t.run_build_system()
32t.expect_addition("bin/$toolset/debug/foo.bar")
33t.fail_test(find(t.read("bin/$toolset/debug/foo.bar"), "12345678") == -1)
34
35# Regression test. Make sure that if main target requested two times,
36# and build request differ only in incidental properties, the main target
37# if created only once. The bug was discovered by Kirill Lapshin.
38
39t.write("Jamroot", """
40# Make sure that incidental property does not
41# cause second creation of 'hello1.cpp'.
42exe a : dir//hello1.cpp ;
43exe b : dir//hello1.cpp/<hardcode-dll-paths>true ;
44""")
45
46t.write("dir/Jamfile", """
47import common ;
48make hello1.cpp : hello.cpp : common.copy ;
49
50""")
51
52t.write("dir/hello.cpp", """
53int main()
54{
55    return 1;
56}
57""")
58# Show only names of the actions.
59t.run_build_system("-d1 -n")
60t.fail_test(t.stdout().count("copy") != 1)
61
62t.cleanup()
Note: See TracBrowser for help on using the repository browser.