]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/histogram/test/check_build_system.py
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / histogram / test / check_build_system.py
1 #!/usr/bin/env python
2
3 # Copyright Hans Dembinski 2019
4 # Distributed under the Boost Software License, Version 1.0.
5 # See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
6
7 from __future__ import print_function
8 import sys
9 import glob
10 import os
11 import re
12
13 ps = os.path.split
14 pj = os.path.join
15
16 # assumes that check_build_system.py sits in <project_path>/tests
17 project_path = ps(ps(__file__)[0])[0]
18
19 exit_code = 0
20
21 for dir in (pj(project_path, "test"), pj(project_path, "examples")):
22 cpp = set([os.path.basename(x) for x in glob.glob(dir + "/*.cpp")])
23
24 for build_file in ("Jamfile", "CMakeLists.txt"):
25 filename = os.path.join(dir, build_file)
26 if not os.path.exists(filename):
27 continue
28 run = set(re.findall("([a-zA-Z0-9_]+\.cpp)", open(filename).read()))
29
30 diff = cpp - run
31 diff.discard("check_cmake_version.cpp") # ignore
32 diff.discard("check_build_system.py") # ignore
33
34 if diff:
35 print(
36 "NOT TESTED in %s\n " % filename
37 + "\n ".join(["%s/%s" % (dir, x) for x in diff])
38 )
39 exit_code = 1
40
41 sys.exit(exit_code)