]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/build_hooks.py
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / test / build_hooks.py
1 #!/usr/bin/python
2
3 # Copyright (C) Vladimir Prus 2006.
4 # Distributed under the Boost Software License, Version 1.0. (See
5 # accompanying file LICENSE.txt or copy at
6 # https://www.bfgroup.xyz/b2/LICENSE.txt)
7
8 # Tests add-pre-build-hook and add-post-build-hook
9
10 import BoostBuild
11
12 t = BoostBuild.Tester()
13
14 t.write("Jamroot.jam", """
15 import build-system ;
16 build-system.add-pre-build-hook pre-build ;
17 build-system.add-post-build-hook post-build ;
18
19 rule pre-build ( )
20 {
21 ECHO "in" pre-build hook ;
22 }
23
24 rule post-build ( okay ? )
25 {
26 ECHO "in" post-build hook $(okay) ;
27 }
28
29 message show : building main targets ;
30 """)
31
32 t.run_build_system(stdout="""\
33 building main targets
34 in pre-build hook
35 ...found 1 target...
36 in post-build hook ok
37 """)
38
39 t.cleanup()