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 | |
---|
8 | from BoostBuild import Tester, List |
---|
9 | |
---|
10 | t = Tester() |
---|
11 | |
---|
12 | # Regression test: when staging V2 used to change suffixes on targets |
---|
13 | # corresponding to real files. |
---|
14 | t.write("Jamfile", """ |
---|
15 | import type : register ; |
---|
16 | register A : a1 a2 a3 ; |
---|
17 | |
---|
18 | stage a : a.a3 ; |
---|
19 | """) |
---|
20 | |
---|
21 | t.write("project-root.jam", "") |
---|
22 | t.write("a.a3", "") |
---|
23 | |
---|
24 | t.run_build_system() |
---|
25 | t.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. |
---|
29 | t.write("a.cpp", "") |
---|
30 | |
---|
31 | t.write("suffixes.jam", """ |
---|
32 | import type ; |
---|
33 | import generators ; |
---|
34 | import common ; |
---|
35 | |
---|
36 | type.register First : first : ; |
---|
37 | type.register Second : "" : First ; |
---|
38 | |
---|
39 | generators.register-standard $(__name__).second : CPP : Second ; |
---|
40 | |
---|
41 | rule second |
---|
42 | { |
---|
43 | TOUCH on $(<) = [ common.file-creation-command ] ; |
---|
44 | } |
---|
45 | |
---|
46 | actions second |
---|
47 | { |
---|
48 | $(TOUCH) $(<) |
---|
49 | } |
---|
50 | |
---|
51 | """) |
---|
52 | |
---|
53 | t.write("project-root.jam", """ |
---|
54 | import suffixes ; |
---|
55 | """) |
---|
56 | |
---|
57 | t.write("Jamfile", """ |
---|
58 | second a : a.cpp ; |
---|
59 | """) |
---|
60 | |
---|
61 | t.run_build_system() |
---|
62 | t.expect_addition("bin/$toolset/debug/a") |
---|
63 | |
---|
64 | |
---|
65 | t.cleanup() |
---|
Note: See
TracBrowser
for help on using the repository browser.