Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/tools/build/v2/test/suffix.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.3 KB
Line 
1#!/usr/bin/python
2
3#  Copyright (C) Vladimir Prus 2003. Permission to copy, use, modify, sell and
4#  distribute this software is granted provided this copyright notice appears in
5#  all copies. This software is provided "as is" without express or implied
6#  warranty, and with no claim as to its suitability for any purpose.
7
8from BoostBuild import Tester, List
9
10t = Tester()
11
12#  Regression test: when staging V2 used to change suffixes on targets
13#  corresponding to real files.
14t.write("Jamfile", """
15import type : register ;
16register A : a1 a2 a3 ;
17
18stage a : a.a3 ;
19""")
20
21t.write("project-root.jam", "")
22t.write("a.a3", "")
23
24t.run_build_system()
25t.expect_addition("a/a.a3");
26
27# Regression test: we should be able to specify empty suffix for
28# derived target type, even if base type has non-empty suffix.
29t.write("a.cpp", "")
30
31t.write("suffixes.jam", """
32import type ;
33import generators ;
34import common ;
35
36type.register First : first : ;
37type.register Second : "" : First ;
38
39generators.register-standard $(__name__).second : CPP : Second ;
40
41rule second
42{
43    TOUCH on $(<) = [ common.file-creation-command ] ;
44}
45
46actions second
47{
48    $(TOUCH) $(<)
49}
50
51""")
52
53t.write("project-root.jam", """
54import suffixes ;
55""")
56
57t.write("Jamfile", """
58second a : a.cpp ;
59""")
60
61t.run_build_system()
62t.expect_addition("bin/$toolset/debug/a")
63
64
65t.cleanup()
Note: See TracBrowser for help on using the repository browser.