File: module_actions.py

package info (click to toggle)
boost-build 2.0-m12-2
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 8,692 kB
  • ctags: 6,963
  • sloc: ansic: 39,914; sh: 9,086; python: 6,120; xml: 5,524; cpp: 1,467; yacc: 456; asm: 353; makefile: 184
file content (44 lines) | stat: -rw-r--r-- 1,073 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/python

# Copyright 2003 Dave Abrahams 
# Copyright 2006 Rene Rivera 
# Copyright 2003 Vladimir Prus 
# Distributed under the Boost Software License, Version 1.0. 
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 

from BoostBuild import Tester, List
import os
import re

spaces_re = re.compile("\ \ +")
trailing_spaces_re = re.compile("\ +\n")

t = Tester(pass_toolset=0)

t.set_tree('module-actions')

expected = r'''A.act t1: X1-t1   
B.act t1: X1-t1 X2-B  
act t1: X1-t1 X2-global X3-global 
A.act t2: X1-A X2-t2  
B.act t2:  X2-t2  
act t2: X1-global X2-t2 X3-global 
A.act t3: X1-A  X3-t3 
B.act t3:  X2-B X3-t3 
act t3: X1-global X2-global X3-t3 
'''

# On Unixes, call to 'echo 1     2      3' produces '1 2 3' (note spacing)
# Accomodate for that fact.
if os.name != 'nt':
    expected = re.sub(spaces_re, " ", expected)
    expected = re.sub(trailing_spaces_re, "\n", expected)    

# We expect t5 and t7's output to be dumped to stdout
t.run_build_system(
    stdout = expected
)

t.expect_nothing_more()
t.cleanup()