Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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