Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/tools/build/v2/test/startup_v2.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: 2.2 KB
Line 
1#!/usr/bin/python
2
3# Copyright 2002 Dave Abrahams
4# Copyright 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
10import re
11
12def match_re(actual,expected):
13    return re.match(expected,actual,re.DOTALL) != None
14
15# Test the v1 startup behavior
16t = Tester(
17    match= match_re
18    , boost_build_path=''
19    , pass_toolset=0
20    )
21
22t.set_tree('startup')
23
24t.run_build_system(
25    status=1, stdout=r'''Unable to load Boost\.Build: could not find "boost-build.jam"
26.*Attempted search from .* up to the root''', match = match_re)
27
28os.chdir('no-bootstrap1')
29
30t.run_build_system(
31    status=1
32    , stdout=r'''Unable to load Boost\.Build: could not find build system\.'''
33    + r'''.*attempted to load the build system by invoking'''
34    + r'''.*'boost-build ;'.*'''
35    + r'''but we were unable to find "bootstrap\.jam"'''
36    )
37
38# Descend to a subdirectory which /doesn't/ contain a boost-build.jam
39# file, and try again to test the crawl-up behavior.
40os.chdir('subdir')
41
42t.run_build_system(
43    status=1
44    , stdout=r'''Unable to load Boost\.Build: could not find build system\.'''
45    + r'''.*attempted to load the build system by invoking'''
46    + r'''.*'boost-build ;'.*'''
47    + r'''but we were unable to find "bootstrap\.jam"'''
48    )
49
50os.chdir('../../no-bootstrap2')
51
52t.run_build_system(
53    status=1
54    , stdout=r'''Unable to load Boost\.Build: could not find build system\.'''
55    + r'''.*attempted to load the build system by invoking'''
56    + r'''.*'boost-build \. ;'.*'''
57    + r'''but we were unable to find "bootstrap\.jam"'''
58    )
59
60os.chdir('../no-bootstrap3')
61
62t.run_build_system(
63    status=1
64    , stdout=r'''Unable to load Boost.Build
65.*boost-build.jam" was found.*
66However, it failed to call the "boost-build" rule'''
67    )
68
69# test bootstrapping based on BOOST_BUILD_PATH
70os.chdir('../bootstrap-env')
71t.run_build_system(
72    extra_args = '-sBOOST_BUILD_PATH=../boost-root/build'
73    , stdout = 'build system bootstrapped'
74    )
75
76# test bootstrapping based on an explicit path in boost-build.jam
77os.chdir('../bootstrap-explicit')
78t.run_build_system(
79    stdout = 'build system bootstrapped'
80    )
81
82t.cleanup()
83
Note: See TracBrowser for help on using the repository browser.