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:
954 bytes
|
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 | # Test that the user can define his own rule that will call builtin main |
---|
9 | # target rule and that this will work. |
---|
10 | |
---|
11 | from BoostBuild import Tester, List |
---|
12 | |
---|
13 | t = Tester() |
---|
14 | |
---|
15 | t.write("Jamfile", """ my-test : test.cpp ; |
---|
16 | |
---|
17 | |
---|
18 | """) |
---|
19 | |
---|
20 | t.write("test.cpp", """ |
---|
21 | int main() |
---|
22 | { |
---|
23 | return 0; |
---|
24 | } |
---|
25 | |
---|
26 | """) |
---|
27 | |
---|
28 | t.write("project-root.jam", """ using testing ; |
---|
29 | |
---|
30 | rule my-test ( name ? : sources + ) |
---|
31 | { |
---|
32 | { |
---|
33 | name ?= test ; |
---|
34 | unit-test $(name) : $(sources) ; # /site-config//cppunit /util//testMain ; |
---|
35 | } |
---|
36 | } |
---|
37 | |
---|
38 | IMPORT $(__name__) : my-test : : my-test ; |
---|
39 | |
---|
40 | |
---|
41 | """) |
---|
42 | |
---|
43 | t.run_build_system() |
---|
44 | t.expect_addition("bin/$toolset/debug/test.passed") |
---|
45 | |
---|
46 | t.cleanup() |
---|
47 | |
---|
Note: See
TracBrowser
for help on using the repository browser.