Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/tools/build/v2/test/project_test1.py @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

File size: 1.7 KB
Line 
1#!/usr/bin/python
2
3from BoostBuild import Tester
4import os
5
6t = Tester("--build-system=project-test1", boost_build_path='', pass_toolset=0)
7
8# This test does no modifications, so run in in the invocation dir
9
10os.chdir(t.original_workdir)
11
12
13expected_output1="""Project Roots:
14
15"""
16
17expected_output2="""'%(root-dir-prefix)sdir2':
18
19  Module for project-root is 'project-root<%(root-dir-prefix)sdir2>'
20
21Projects:
22
23'/cool-library':
24
25* Parent project: (none)
26* Requirements: <include>/home/ghost/build/boost-cvs
27* Default build:
28* Source location: %(root-dir-prefix)sdir2
29* Projects to build:
30
31"""
32
33expected_output3="""'%(root-dir)s':
34
35  Module for project-root is 'project-root<%(root-dir)s>'
36
37Projects:
38
39'/boost-build-test-project-1':
40
41* Parent project: (none)
42* Requirements: <include>/home/ghost/local/include <threading>multi
43* Default build:
44* Source location: %(root-dir)s
45* Projects to build: dir dir2
46
47'/boost-build-test-project-1/dir':
48
49* Parent project: %(root-dir)s
50* Requirements: <include>/home/ghost/local/include <threading>multi
51* Default build: <variant>release
52* Source location: %(root-dir-prefix)sdir/src
53* Projects to build:
54
55"""
56
57# Test that correct project structure is created when jam is invoked
58# outside of the source tree.
59expected = (expected_output1 + expected_output2 + expected_output3) % \
60    {"root-dir": "project-test1",
61     "root-dir-prefix": "project-test1/" }
62
63t.run_build_system(stdout=expected)
64
65# Test that correct project structure is created when jam is invoked
66# at the top of the source tree.
67expected = (expected_output1 + expected_output3 + expected_output2) % \
68    {"root-dir": ".",
69     "root-dir-prefix": "" }
70
71os.chdir("project-test1")
72t.run_build_system(stdout=expected)
73
74t.cleanup()
Note: See TracBrowser for help on using the repository browser.