-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathci_boost_library_check.py
42 lines (32 loc) · 1.39 KB
/
ci_boost_library_check.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python
# Copyright Rene Rivera 2016
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import os.path
import shutil
from ci_boost_common import main, utils, script_common
class script(script_common):
'''
Main script to build/test Boost C++ Libraries continuous releases.
'''
def __init__(self, ci_klass, **kargs):
script_common.__init__(self, ci_klass, **kargs)
def command_build(self):
# Check the library for 'fitness'. This just means
# running the built-in tests that check for library requirements,
# etc.
# Set up where we will "install" built tools.
utils.makedirs(os.path.join(self.build_dir,'dist','bin'))
os.environ['PATH'] = os.path.join(self.build_dir,'dist','bin')+':'+os.environ['PATH']
os.environ['BOOST_BUILD_PATH'] = self.build_dir
# Bootstrap Boost Build engine.
os.chdir(os.path.join(self.root_dir,"tools","build"))
utils.check_call("./bootstrap.sh")
shutil.copy2("b2", os.path.join(self.build_dir,"dist","bin","b2"))
utils.check_call("git","clean","-dfqx")
# Run tests for library requirements checking.
os.chdir(os.path.join(self.root_dir,"status"))
self.b2("-d0","--check-libs-only")
main(script)