Skip to content

Commit

Permalink
Add support to override b2 exec for testing.
Browse files Browse the repository at this point in the history
Adds use of `B2` env var to specify the b2 exec to use for testing.
This allows us to use debug and sanitizer builds for testing.
  • Loading branch information
grafikrobot committed Dec 31, 2020
1 parent 29baa79 commit ddf2a8c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/BoostBuild.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2002-2005 Vladimir Prus.
# Copyright 2002-2003 Dave Abrahams.
# Copyright 2006 Rene Rivera.
# Copyright 2006 Rene Ferdinand Rivera Morell.
# 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)
Expand Down Expand Up @@ -236,12 +236,17 @@ class Tester(TestCmd.TestCmd):
system output like the --verbose command
line option does.
"""
def __init__(self, arguments=None, executable="b2",
def __init__(self, arguments=None, executable=None,
match=TestCmd.match_exact, boost_build_path=None,
translate_suffixes=True, pass_toolset=True, use_test_config=True,
ignore_toolset_requirements=False, workdir="", pass_d0=False,
**keywords):

if not executable:
executable = os.getenv('B2')
if not executable:
executable = 'b2'

assert arguments.__class__ is not str
self.original_workdir = os.path.dirname(__file__)
if workdir and not os.path.isabs(workdir):
Expand Down

0 comments on commit ddf2a8c

Please sign in to comment.