]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/symlink.py
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / tools / build / test / symlink.py
1 #!/usr/bin/python
2
3 # Copyright 2003 Dave Abrahams
4 # Copyright 2003 Vladimir Prus
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7
8 # Test the 'symlink' rule.
9
10 from __future__ import print_function
11
12 import os
13 import BoostBuild
14
15
16 if os.name != 'posix':
17 print("The symlink tests can be run on posix only.")
18 import sys
19 sys.exit(1)
20
21
22 t = BoostBuild.Tester(use_test_config=False)
23
24 t.write("jamroot.jam", "import gcc ;")
25
26 t.write("jamfile.jam", """
27 exe hello : hello.cpp ;
28 symlink hello_release : hello/<variant>release ;
29 symlink hello_debug : hello/<variant>debug ;
30 symlink links/hello_release : hello/<variant>release ;
31 """)
32
33 t.write("hello.cpp", """
34 int main() {}
35 """)
36
37 t.run_build_system()
38 t.expect_addition([
39 'hello_debug.exe',
40 'hello_release.exe',
41 'links/hello_release.exe'])
42
43 t.cleanup()