From 86635bd9251c8f6d34c38d76f9df08ccb97e8a86 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 8 Jan 2003 19:42:09 +0000 Subject: [PATCH] Add verbosity command-line option to dump build actions. [SVN r16800] --- test/BoostBuild.py | 18 +++++++++++++----- v2/test/BoostBuild.py | 18 +++++++++++++----- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/test/BoostBuild.py b/test/BoostBuild.py index 9623bdce7..f0ba32e67 100644 --- a/test/BoostBuild.py +++ b/test/BoostBuild.py @@ -9,6 +9,7 @@ import string import types import time import tempfile +import sys # Compute an executable suffix for tests to use exe_suffix = '' @@ -46,7 +47,8 @@ class Tester(TestCmd.TestCmd): behavior. """ def __init__(self, arguments="", executable = 'bjam', match = - TestCmd.match_exact, boost_build_path = None): + TestCmd.match_exact, boost_build_path = None, + **keywords): self.original_workdir = os.getcwd() self.last_build_time = 0 @@ -63,17 +65,23 @@ class Tester(TestCmd.TestCmd): raise "Don't know directory where jam is build for this system" if boost_build_path is None: - boost_build_path = os.path.join(self.original_workdir, "..", "new") + boost_build_path = os.path.join(self.original_workdir, + "..", "new") + + verbosity = ' -d0 --quiet ' + if '--verbose' in sys.argv: + verbosity = ' -d+2 ' TestCmd.TestCmd.__init__( self , program=os.path.join( '..', 'jam_src', jam_build_dir, executable) + ' -sBOOST_BUILD_PATH=' + boost_build_path - + ' -d0 --quiet' - + ' ' + arguments + + verbosity + + arguments , match=match - , workdir='') + , workdir='' + , **keywords) os.chdir(self.workdir) diff --git a/v2/test/BoostBuild.py b/v2/test/BoostBuild.py index 9623bdce7..f0ba32e67 100644 --- a/v2/test/BoostBuild.py +++ b/v2/test/BoostBuild.py @@ -9,6 +9,7 @@ import string import types import time import tempfile +import sys # Compute an executable suffix for tests to use exe_suffix = '' @@ -46,7 +47,8 @@ class Tester(TestCmd.TestCmd): behavior. """ def __init__(self, arguments="", executable = 'bjam', match = - TestCmd.match_exact, boost_build_path = None): + TestCmd.match_exact, boost_build_path = None, + **keywords): self.original_workdir = os.getcwd() self.last_build_time = 0 @@ -63,17 +65,23 @@ class Tester(TestCmd.TestCmd): raise "Don't know directory where jam is build for this system" if boost_build_path is None: - boost_build_path = os.path.join(self.original_workdir, "..", "new") + boost_build_path = os.path.join(self.original_workdir, + "..", "new") + + verbosity = ' -d0 --quiet ' + if '--verbose' in sys.argv: + verbosity = ' -d+2 ' TestCmd.TestCmd.__init__( self , program=os.path.join( '..', 'jam_src', jam_build_dir, executable) + ' -sBOOST_BUILD_PATH=' + boost_build_path - + ' -d0 --quiet' - + ' ' + arguments + + verbosity + + arguments , match=match - , workdir='') + , workdir='' + , **keywords) os.chdir(self.workdir)