]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/test/core_at_file.py
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / test / core_at_file.py
CommitLineData
7c673cae
FG
1#!/usr/bin/python
2
3# Copyright 2011 Steven Watanabe
1e59de90 4# Copyright 2020 Rene Ferdinand Rivera Morell
7c673cae 5# Distributed under the Boost Software License, Version 1.0.
1e59de90
TL
6# (See accompanying file LICENSE.txt or copy at
7# https://www.bfgroup.xyz/b2/LICENSE.txt)
7c673cae
FG
8
9
10import BoostBuild
11
12t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
13
14t.write("file.jam", """\
15name = n1 n2 ;
16contents = M1 M2 ;
1e59de90 17EXIT "file:" "@(o$(name:J=) .txt:E= test -D$(contents))" : 0 ;
7c673cae
FG
18""")
19
20t.run_build_system()
1e59de90
TL
21t.expect_output_lines("file: on1n2 .txt")
22t.expect_addition("on1n2 .txt")
23t.expect_content("on1n2 .txt", " test -DM1 -DM2", True)
7c673cae
FG
24
25t.rm(".")
26
27t.write("file.jam", """\
28name = n1 n2 ;
29contents = M1 M2 ;
1e59de90 30actions run { echo file: "@(o$(name:J=) .txt:E= test -D$(contents))" }
7c673cae
FG
31run all ;
32""")
33
34t.run_build_system(["-d2"])
1e59de90
TL
35t.expect_output_lines(' echo file: "on1n2 .txt" ')
36t.expect_addition("on1n2 .txt")
37t.expect_content("on1n2 .txt", " test -DM1 -DM2", True)
7c673cae
FG
38
39t.rm(".")
40
41t.write("file.jam", """\
42name = n1 n2 ;
43contents = M1 M2 ;
44file = "@($(STDOUT):E= test -D$(contents)\n)" ;
45actions run { $(file) }
46run all ;
47""")
48
49t.run_build_system(["-d1"])
50t.expect_output_lines(" test -DM1 -DM2")
51
52t.rm(".")
53
54t.write("file.jam", """\
55name = n1 n2 ;
56contents = M1 M2 ;
57actions run { @($(STDOUT):E= test -D$(contents)\n) }
58run all ;
59""")
60
61t.run_build_system(["-d1"])
62t.expect_output_lines(" test -DM1 -DM2")
63
64t.cleanup()