Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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