Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/double_loading.py @ 32

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: 1.2 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
9import string
10
11t = Tester()
12
13#  Regression test for double loading of the same Jamfile.
14t.write("Jamfile", """
15build-project subdir ;
16""")
17
18t.write("project-root.jam", """
19""")
20
21t.write("subdir/Jamfile", """
22ECHO "Loaded subdir" ;
23""")
24
25t.run_build_system(subdir="subdir")
26t.fail_test(string.count(t.stdout(), "Loaded subdir") != 1)
27
28#  Regression test for a more contrived case. The top-level
29#  jamfile refers to subdir via use-project, while subdir's
30#  Jamfile is being loaded. The motivation why use-project
31#  referring to subprojects are usefull can be found at
32#  http://article.gmane.org/gmane.comp.lib.boost.build/3906/
33t.write("Jamfile", """
34use-project /subdir : subdir ;
35""")
36
37t.write("project-root.jam", """
38""")
39
40t.write("subdir/Jamfile", """
41project subdir ;
42""")
43
44t.run_build_system(subdir="subdir");
45
46t.cleanup()
47
Note: See TracBrowser for help on using the repository browser.