Files
release-tools/ci_boost_library_check.py
2016-06-17 09:45:10 -05:00

43 lines
1.4 KiB
Python

#!/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)