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:
825 bytes
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
3 | # Copyright 2004 Vladimir Prus |
---|
4 | # Distributed under the Boost Software License, Version 1.0. |
---|
5 | # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) |
---|
6 | |
---|
7 | # Test that the user can define his own rule that will call builtin main |
---|
8 | # target rule and that this will work. |
---|
9 | |
---|
10 | from BoostBuild import Tester, List |
---|
11 | |
---|
12 | t = Tester() |
---|
13 | |
---|
14 | t.write("Jamfile", """ my-test : test.cpp ; |
---|
15 | |
---|
16 | |
---|
17 | """) |
---|
18 | |
---|
19 | t.write("test.cpp", """ |
---|
20 | int main() |
---|
21 | { |
---|
22 | return 0; |
---|
23 | } |
---|
24 | |
---|
25 | """) |
---|
26 | |
---|
27 | t.write("project-root.jam", """ using testing ; |
---|
28 | |
---|
29 | rule my-test ( name ? : sources + ) |
---|
30 | { |
---|
31 | { |
---|
32 | name ?= test ; |
---|
33 | unit-test $(name) : $(sources) ; # /site-config//cppunit /util//testMain ; |
---|
34 | } |
---|
35 | } |
---|
36 | |
---|
37 | IMPORT $(__name__) : my-test : : my-test ; |
---|
38 | |
---|
39 | |
---|
40 | """) |
---|
41 | |
---|
42 | t.run_build_system() |
---|
43 | t.expect_addition("bin/$toolset/debug/test.passed") |
---|
44 | |
---|
45 | t.cleanup() |
---|
46 | |
---|
Note: See
TracBrowser
for help on using the repository browser.