]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/builtin_exit.py
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / test / builtin_exit.py
1 #!/usr/bin/python
2
3 # Copyright 2012 Steven Watanabe
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
6
7 # This tests the EXIT rule.
8
9 import BoostBuild
10
11 def test_exit(name):
12 t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
13
14 t.write("file.jam", "%s ;" % name)
15 t.run_build_system(status=1, stdout="\n")
16 t.rm(".")
17
18 t.write("file.jam", "%s : 0 ;" % name)
19 t.run_build_system(stdout="\n")
20 t.rm(".")
21
22 t.write("file.jam", "%s : 1 ;" % name)
23 t.run_build_system(status=1, stdout="\n")
24 t.rm(".")
25
26 t.write("file.jam", "%s : 2 ;" % name)
27 t.run_build_system(status=2, stdout="\n")
28 t.rm(".")
29
30 t.write("file.jam", "%s a message ;" % name)
31 t.run_build_system(status=1, stdout="a message\n")
32 t.rm(".")
33
34 t.write("file.jam", "%s a message : 0 ;" % name)
35 t.run_build_system(stdout="a message\n")
36 t.rm(".")
37
38 t.cleanup()
39
40 test_exit("EXIT")
41 test_exit("Exit")
42 test_exit("exit")