]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/notfile.py
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / test / notfile.py
1 #!/usr/bin/python
2
3 # Copyright (C) Vladimir Prus 2005.
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE_1_0.txt or copy at
6 # http://www.boost.org/LICENSE_1_0.txt)
7
8 # Basic tests for the 'notfile' rule.
9
10 import BoostBuild
11 import os
12
13 t = BoostBuild.Tester()
14
15 t.write("jamroot.jam", """\
16 import notfile ;
17 notfile say : "echo hi" ;
18 exe hello : hello.cpp ;
19 notfile hello_valgrind : @valgrind : hello ;
20 actions valgrind { valgrind $(>[1]) }
21 """)
22
23 t.write("hello.cpp", """\
24 #include <iostream>
25 int main() { std::cout << "Hello!\\n"; }
26 """)
27
28 t.run_build_system(["-n", "-d+2"])
29
30 t.fail_test(t.stdout().find("echo hi") == -1)
31
32 name = t.adjust_names("bin/$toolset/debug*/hello.exe")[0]
33 name = apply(os.path.join, name.split("/"));
34 t.expect_output_lines(" valgrind *%s " % name)
35
36 t.cleanup()