]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/copy_time.py
3 # Copyright (c) 2008 Steven Watanabe
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE.txt or copy at
7 # https://www.bfgroup.xyz/b2/LICENSE.txt)
9 # Test that the common.copy rule set the modification date of the new file to
14 tester
= BoostBuild
.Tester(use_test_config
=False)
16 tester
.write("test1.cpp", """\
17 template<bool, int M, class Next>
19 typedef typename time_waster<true, M-1, time_waster>::type type1;
20 typedef typename time_waster<false, M-1, time_waster>::type type2;
23 template<bool B, class Next>
24 struct time_waster<B, 0, Next> {
27 typedef time_waster<true, 10, void>::type type;
31 tester
.write("test2.cpp", """\
32 template<bool, int M, class Next>
34 typedef typename time_waster<true, M-1, time_waster>::type type1;
35 typedef typename time_waster<false, M-1, time_waster>::type type2;
38 template<bool B, class Next>
39 struct time_waster<B, 0, Next> {
42 typedef time_waster<true, 10, void>::type type;
46 tester
.write("jamroot.jam", """\
47 obj test2 : test2.cpp ;
48 obj test1 : test1.cpp : <dependency>test2 ;
49 install test2i : test2 : <dependency>test1 ;
52 tester
.run_build_system()
53 tester
.expect_addition("bin/$toolset/debug*/test2.obj")
54 tester
.expect_addition("bin/$toolset/debug*/test1.obj")
55 tester
.expect_addition("test2i/test2.obj")
56 tester
.expect_nothing_more()
58 test2src
= tester
.read("test2i/test2.obj", binary
=True)
59 test2dest
= tester
.read("bin/$toolset/debug*/test2.obj", binary
=True)
60 if test2src
!= test2dest
:
61 BoostBuild
.annotation("failure", "The object file was not copied "
65 tester
.run_build_system(["-d1"])
66 tester
.expect_output_lines("common.copy*", False)
67 tester
.expect_nothing_more()