mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 13:02:11 +00:00
Updated the internal Boost Build testing system to use the Python subprocess module (introduced in Python 2.4) for running external processes instead of popen2 (deprecated since Python 2.6). We are already using Python 2.4 features in this codebase so there is no need to support Python releases older than 2.4.
Related changes: * BoostBuild.Tester & TestCmd.TestCmd interfaces now accept external process parameters as a list of strings, thus avoiding problems with parsing arguments containing spaces. * Avoided a potential process hang in case an external process being run prints out enough output to fill up the OS's pipe buffer (OS would pause the process until someone read the data from the pipe but the testing framework would not do this until the process in question had terminated). [SVN r79448]
This commit is contained in:
@@ -157,26 +157,6 @@ def glob_remove(sequence, pattern):
|
||||
sequence.remove(r)
|
||||
|
||||
|
||||
#
|
||||
# FIXME: this is copy-pasted from TestSCons.py
|
||||
# Should be moved to TestCmd.py?
|
||||
#
|
||||
if os.name == 'posix':
|
||||
def _failed(self, status=0):
|
||||
if self.status is None:
|
||||
return None
|
||||
return _status(self) != status
|
||||
def _status(self):
|
||||
if os.WIFEXITED(self.status):
|
||||
return os.WEXITSTATUS(self.status)
|
||||
return -1
|
||||
elif os.name == 'nt':
|
||||
def _failed(self, status=0):
|
||||
return not self.status is None and self.status != status
|
||||
def _status(self):
|
||||
return self.status
|
||||
|
||||
|
||||
class Tester(TestCmd.TestCmd):
|
||||
"""Main tester class for Boost Build.
|
||||
|
||||
@@ -222,11 +202,12 @@ class Tester(TestCmd.TestCmd):
|
||||
system output like the --verbose command
|
||||
line option does.
|
||||
"""
|
||||
def __init__(self, arguments="", executable="bjam",
|
||||
def __init__(self, arguments=None, executable="bjam",
|
||||
match=TestCmd.match_exact, boost_build_path=None,
|
||||
translate_suffixes=True, pass_toolset=True, use_test_config=True,
|
||||
ignore_toolset_requirements=True, workdir="", pass_d0=True, **keywords):
|
||||
|
||||
assert arguments.__class__ is not str
|
||||
self.original_workdir = os.getcwd()
|
||||
if workdir and not os.path.isabs(workdir):
|
||||
raise ("Parameter workdir <%s> must point to an absolute "
|
||||
@@ -315,7 +296,7 @@ class Tester(TestCmd.TestCmd):
|
||||
if verbosity:
|
||||
program_list += verbosity
|
||||
if arguments:
|
||||
program_list += arguments.split(" ")
|
||||
program_list += arguments
|
||||
|
||||
TestCmd.TestCmd.__init__(self, program=program_list, match=match,
|
||||
workdir=workdir, inpath=use_default_bjam, **keywords)
|
||||
@@ -439,11 +420,12 @@ class Tester(TestCmd.TestCmd):
|
||||
#
|
||||
# FIXME: Large portion copied from TestSCons.py, should be moved?
|
||||
#
|
||||
def run_build_system(self, extra_args="", subdir="", stdout=None,
|
||||
def run_build_system(self, extra_args=None, subdir="", stdout=None,
|
||||
stderr="", status=0, match=None, pass_toolset=None,
|
||||
use_test_config=None, ignore_toolset_requirements=None,
|
||||
expected_duration=None, **kw):
|
||||
|
||||
assert extra_args.__class__ is not str
|
||||
build_time_start = time.time()
|
||||
|
||||
try:
|
||||
@@ -470,7 +452,7 @@ class Tester(TestCmd.TestCmd):
|
||||
kw['program'] = []
|
||||
kw['program'] += self.program
|
||||
if extra_args:
|
||||
kw['program'] += extra_args.split(" ")
|
||||
kw['program'] += extra_args
|
||||
if pass_toolset:
|
||||
kw['program'].append("toolset=" + self.toolset)
|
||||
if use_test_config:
|
||||
@@ -490,13 +472,13 @@ class Tester(TestCmd.TestCmd):
|
||||
old_last_build_time_finish = self.last_build_time_finish
|
||||
self.last_build_time_finish = time.time()
|
||||
|
||||
if status is not None and _failed(self, status):
|
||||
if (status and self.status) is not None and self.status != status:
|
||||
expect = ''
|
||||
if status != 0:
|
||||
expect = " (expected %d)" % status
|
||||
|
||||
annotation("failure", '"%s" returned %d%s' % (kw['program'],
|
||||
_status(self), expect))
|
||||
self.status, expect))
|
||||
|
||||
annotation("reason", "unexpected status returned by bjam")
|
||||
self.fail_test(1)
|
||||
|
||||
@@ -58,10 +58,10 @@ from types import *
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import popen2
|
||||
import re
|
||||
import shutil
|
||||
import stat
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import traceback
|
||||
@@ -374,20 +374,26 @@ class TestCmd:
|
||||
raise ValueError, "mode must begin with 'r'"
|
||||
return open(file, mode).read()
|
||||
|
||||
def run(self, program=None, arguments=None, chdir=None, stdin=None):
|
||||
def run(self, program=None, arguments=None, chdir=None, stdin=None,
|
||||
universal_newlines=True):
|
||||
"""
|
||||
Runs a test of the program or script for the test environment.
|
||||
Standard output and error output are saved for future retrieval via the
|
||||
stdout() and stderr() methods.
|
||||
|
||||
'universal_newlines' parameter controls how the child process
|
||||
input/output streams are opened as defined for the same named Python
|
||||
subprocess.POpen constructor parameter.
|
||||
|
||||
"""
|
||||
if chdir:
|
||||
oldcwd = os.getcwd()
|
||||
if not os.path.isabs(chdir):
|
||||
chdir = os.path.join(self.workpath(chdir))
|
||||
if self.verbose:
|
||||
sys.stderr.write("chdir(" + chdir + ")\n")
|
||||
os.chdir(chdir)
|
||||
else:
|
||||
chdir = self.workdir
|
||||
|
||||
cmd = []
|
||||
if program and program[0]:
|
||||
if program[0] != self.program[0] and not os.path.isabs(program[0]):
|
||||
@@ -400,86 +406,9 @@ class TestCmd:
|
||||
if self.verbose:
|
||||
sys.stderr.write(join(cmd, " ") + "\n")
|
||||
try:
|
||||
p = popen2.Popen3(cmd, 1)
|
||||
except AttributeError:
|
||||
# We end up here in case the popen2.Popen3 class is not available
|
||||
# (e.g. on Windows). We will be using the os.popen3() Python API
|
||||
# which takes a string parameter and so needs its executable quoted
|
||||
# in case its name contains spaces.
|
||||
for i in xrange(len(cmd)):
|
||||
if not cmd[i] or '"' in cmd[i]:
|
||||
pass
|
||||
elif cmd[i][-1] == '\\':
|
||||
cmd[i] = '"' + cmd[i] + '\\"'
|
||||
else:
|
||||
cmd[i] = '"' + cmd[i] + '"'
|
||||
command_string = join(cmd, " ")
|
||||
if ( os.name == 'nt' ):
|
||||
# This is a workaround for a longstanding Python bug on Windows
|
||||
# when using os.popen(), os.system() and similar functions to
|
||||
# execute a command containing quote characters. The bug seems
|
||||
# to be related to the quote stripping functionality used by
|
||||
# the Windows cmd.exe interpreter when its /S is not specified.
|
||||
#
|
||||
# Cleaned up quote from the cmd.exe help screen as displayed on
|
||||
# Windows XP SP2:
|
||||
#
|
||||
# 1. If all of the following conditions are met, then quote
|
||||
# characters on the command line are preserved:
|
||||
#
|
||||
# - no /S switch
|
||||
# - exactly two quote characters
|
||||
# - no special characters between the two quote
|
||||
# characters, where special is one of: &<>()@^|
|
||||
# - there are one or more whitespace characters between
|
||||
# the two quote characters
|
||||
# - the string between the two quote characters is the
|
||||
# name of an executable file.
|
||||
#
|
||||
# 2. Otherwise, old behavior is to see if the first character
|
||||
# is a quote character and if so, strip the leading
|
||||
# character and remove the last quote character on the
|
||||
# command line, preserving any text after the last quote
|
||||
# character.
|
||||
#
|
||||
# This causes some commands containing quotes not to be
|
||||
# executed correctly. For example:
|
||||
#
|
||||
# "\Long folder name\aaa.exe" --name="Foo" --no-surname
|
||||
#
|
||||
# would get its outermost quotes stripped and would be executed
|
||||
# as:
|
||||
#
|
||||
# \Long folder name\aaa.exe" --name="Foo --no-surname
|
||||
#
|
||||
# which would report an error about '\Long' not being a valid
|
||||
# command.
|
||||
#
|
||||
# cmd.exe help seems to indicate it would be enough to add an
|
||||
# extra space character in front of the command to avoid this
|
||||
# but this does not work, most likely due to the shell first
|
||||
# stripping all leading whitespace characters from the command.
|
||||
#
|
||||
# Solution implemented here is to quote the whole command in
|
||||
# case it contains any quote characters. Note thought this will
|
||||
# not work correctly should Python ever fix this bug.
|
||||
# (01.05.2008.) (Jurko)
|
||||
if command_string.find('"') != -1:
|
||||
command_string = '"%s"' % command_string
|
||||
tochild, fromchild, childerr = os.popen3(command_string)
|
||||
if stdin:
|
||||
if type(stdin) is ListType:
|
||||
for line in stdin:
|
||||
tochild.write(line)
|
||||
else:
|
||||
tochild.write(stdin)
|
||||
tochild.close()
|
||||
self._stdout.append(fromchild.read())
|
||||
self._stderr.append(childerr.read())
|
||||
fromchild.close()
|
||||
self.status = childerr.close()
|
||||
if not self.status:
|
||||
self.status = 0
|
||||
p = subprocess.Popen(cmd, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=chdir,
|
||||
universal_newlines=universal_newlines)
|
||||
except:
|
||||
raise
|
||||
else:
|
||||
@@ -489,18 +418,15 @@ class TestCmd:
|
||||
p.tochild.write(line)
|
||||
else:
|
||||
p.tochild.write(stdin)
|
||||
p.tochild.close()
|
||||
self._stdout.append(p.fromchild.read())
|
||||
self._stderr.append(p.childerr.read())
|
||||
self.status = p.wait()
|
||||
out, err = p.communicate()
|
||||
self._stdout.append(out)
|
||||
self._stderr.append(err)
|
||||
self.status = p.returncode
|
||||
|
||||
if self.verbose:
|
||||
sys.stdout.write(self._stdout[-1])
|
||||
sys.stderr.write(self._stderr[-1])
|
||||
|
||||
if chdir:
|
||||
os.chdir(oldcwd)
|
||||
|
||||
def stderr(self, run=None):
|
||||
"""
|
||||
Returns the error output from the specified run number. If there is
|
||||
|
||||
@@ -37,12 +37,12 @@ exe hello : hello.cpp src ;
|
||||
t.write("s.cpp", "")
|
||||
|
||||
# Check that targets to which "bin1" refers are updated, and only those.
|
||||
t.run_build_system("bin1")
|
||||
t.run_build_system(["bin1"])
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/debug/") * "a.exe a.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
# Try again with "bin2"
|
||||
t.run_build_system("bin2")
|
||||
t.run_build_system(["bin2"])
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/debug/") * "b.exe b.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ t.write("a_empty.cpp", "")
|
||||
|
||||
t.write("a.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system("release")
|
||||
t.run_build_system(["release"])
|
||||
|
||||
t.expect_addition("bin/$toolset/release/a.exe")
|
||||
|
||||
@@ -45,7 +45,7 @@ t.rm("bin")
|
||||
t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/b.obj")
|
||||
|
||||
t.run_build_system("X=on")
|
||||
t.run_build_system(["X=on"])
|
||||
t.expect_addition("bin/$toolset/debug/X-on/a.obj")
|
||||
|
||||
t.rm("bin")
|
||||
@@ -67,7 +67,7 @@ exe a : a_empty.cpp : <variant>debug ;
|
||||
exe a : a.cpp : <variant>release ;
|
||||
""")
|
||||
|
||||
t.run_build_system("release")
|
||||
t.run_build_system(["release"])
|
||||
t.expect_addition("bin/$toolset/release/a.exe")
|
||||
|
||||
# Test that free properties do not matter. We really do not want <cxxflags>
|
||||
@@ -78,7 +78,7 @@ exe a : a.cpp : <variant>release ;
|
||||
""")
|
||||
|
||||
t.rm("bin/$toolset/release/a.exe")
|
||||
t.run_build_system("release define=FOO")
|
||||
t.run_build_system(["release", "define=FOO"])
|
||||
t.expect_addition("bin/$toolset/release/a.exe")
|
||||
|
||||
# Test that ambiguity is reported correctly.
|
||||
@@ -86,7 +86,7 @@ t.write("jamfile.jam", """\
|
||||
exe a : a_empty.cpp ;
|
||||
exe a : a.cpp ;
|
||||
""")
|
||||
t.run_build_system("--no-error-backtrace", status=None)
|
||||
t.run_build_system(["--no-error-backtrace"], status=None)
|
||||
t.fail_test(string.find(t.stdout(), "No best alternative") == -1)
|
||||
|
||||
# Another ambiguity test: two matches properties in one alternative are neither
|
||||
@@ -96,7 +96,7 @@ exe a : a_empty.cpp : <optimization>off <profiling>off ;
|
||||
exe a : a.cpp : <debug-symbols>on ;
|
||||
""")
|
||||
|
||||
t.run_build_system("--no-error-backtrace", status=None)
|
||||
t.run_build_system(["--no-error-backtrace"], status=None)
|
||||
t.fail_test(string.find(t.stdout(), "No best alternative") == -1)
|
||||
|
||||
# Test that we can have alternative without sources.
|
||||
|
||||
@@ -59,7 +59,7 @@ t.rm(".")
|
||||
t.write("jamroot.jam", "")
|
||||
|
||||
# Test that we get an error when no project id is specified.
|
||||
t.run_build_system("--build-dir=foo")
|
||||
t.run_build_system(["--build-dir=foo"])
|
||||
t.fail_test(string.find(t.stdout(),
|
||||
"warning: the --build-dir option will be ignored") == -1)
|
||||
|
||||
@@ -72,7 +72,7 @@ t.write("a.cpp", "int main() {}\n")
|
||||
t.write("sub/jamfile.jam", "exe b : b.cpp ;\n")
|
||||
t.write("sub/b.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system("--build-dir=build")
|
||||
t.run_build_system(["--build-dir=build"])
|
||||
t.expect_addition(["build/foo/$toolset/debug/a.exe",
|
||||
"build/foo/sub/$toolset/debug/b.exe"])
|
||||
|
||||
@@ -82,7 +82,7 @@ exe a : a.cpp ;
|
||||
build-project sub ;
|
||||
""")
|
||||
|
||||
t.run_build_system("--build-dir=build")
|
||||
t.run_build_system(["--build-dir=build"])
|
||||
t.expect_addition(["build/foo/bin.v2/$toolset/debug/a.exe",
|
||||
"build/foo/bin.v2/sub/$toolset/debug/b.exe"])
|
||||
|
||||
@@ -90,7 +90,7 @@ t.expect_addition(["build/foo/bin.v2/$toolset/debug/a.exe",
|
||||
# 'sub/build'. Today, I am not sure if this is what the user expects, but let
|
||||
# it be.
|
||||
t.rm('build')
|
||||
t.run_build_system("--build-dir=build", subdir="sub")
|
||||
t.run_build_system(["--build-dir=build"], subdir="sub")
|
||||
t.expect_addition(["sub/build/foo/bin.v2/sub/$toolset/debug/b.exe"])
|
||||
|
||||
t.write("jamroot.jam", """\
|
||||
@@ -99,7 +99,7 @@ exe a : a.cpp ;
|
||||
build-project sub ;
|
||||
""" % string.replace(os.getcwd(), '\\', '\\\\'))
|
||||
|
||||
t.run_build_system("--build-dir=build", status=1)
|
||||
t.run_build_system(["--build-dir=build"], status=1)
|
||||
t.fail_test(string.find(t.stdout(),
|
||||
"Absolute directory specified via 'build-dir' project attribute") == -1)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ exe sub : hello.cpp ;
|
||||
""")
|
||||
t.write("sub/hello.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system("sub " + t.adjust_suffix("hello.obj"))
|
||||
t.run_build_system(["sub", t.adjust_suffix("hello.obj")])
|
||||
t.expect_output_line("*depends on itself*", False)
|
||||
t.expect_addition("sub/bin/$toolset/debug/hello.obj")
|
||||
t.expect_nothing_more()
|
||||
@@ -62,7 +62,7 @@ exe hello3 : hello3.cpp ;
|
||||
t.write("hello2.cpp", "int main() {}\n")
|
||||
t.write("hello3.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system("hello1 " + t.adjust_suffix("hello1.obj"))
|
||||
t.run_build_system(["hello1", t.adjust_suffix("hello1.obj")])
|
||||
t.expect_addition("bin/$toolset/debug/hello1.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
@@ -89,7 +89,7 @@ exe hello3 : hello3.cpp ;
|
||||
t.write("hello3.cpp", "int main() {}\n")
|
||||
|
||||
obj = t.adjust_suffix("hello2.obj")
|
||||
t.run_build_system("hello1 " + obj, status=1)
|
||||
t.run_build_system(["hello1", obj], status=1)
|
||||
t.expect_output_line("don't know how to make*" + obj)
|
||||
t.expect_nothing_more()
|
||||
|
||||
@@ -115,8 +115,8 @@ exe hello3 : hello3.cpp ;
|
||||
t.write("hello2.cpp", "int main() {}\n")
|
||||
t.write("hello3.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system(t.adjust_suffix("hello1.obj") + " " + t.adjust_suffix(
|
||||
"hello2.obj"))
|
||||
t.run_build_system([t.adjust_suffix("hello1.obj"), t.adjust_suffix(
|
||||
"hello2.obj")])
|
||||
t.expect_addition("bin/$toolset/debug/hello1.obj")
|
||||
t.expect_addition("bin/$toolset/debug/hello2.obj")
|
||||
t.expect_nothing_more()
|
||||
@@ -147,7 +147,7 @@ exe sub : hello.cpp ;
|
||||
""")
|
||||
t.write("sub/hello.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system(t.adjust_suffix("hello.obj"))
|
||||
t.run_build_system([t.adjust_suffix("hello.obj")])
|
||||
t.expect_output_line("*depends on itself*", False)
|
||||
t.expect_addition("bin/$toolset/debug/hello.obj")
|
||||
t.expect_addition("sub/bin/$toolset/debug/hello.obj")
|
||||
|
||||
@@ -17,7 +17,7 @@ t.write("hello.cpp", "int main() {}\n")
|
||||
t.run_build_system()
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system("release")
|
||||
t.run_build_system(["release"])
|
||||
t.expect_addition("bin/$toolset/release/hello.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import BoostBuild
|
||||
|
||||
def test_echo(name):
|
||||
t = BoostBuild.Tester("-ffile.jam", pass_toolset=0)
|
||||
t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
|
||||
|
||||
t.write("file.jam", """\
|
||||
%s ;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import BoostBuild
|
||||
|
||||
def test_exit(name):
|
||||
t = BoostBuild.Tester("-ffile.jam", pass_toolset=0)
|
||||
t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
|
||||
|
||||
t.write("file.jam", "%s ;" % name)
|
||||
t.run_build_system(status=1, stdout="\n")
|
||||
|
||||
@@ -11,7 +11,7 @@ import BoostBuild
|
||||
def test_invalid(params, expected_error_line):
|
||||
t = BoostBuild.Tester(pass_toolset=0)
|
||||
t.write("file.jam", "SPLIT_BY_CHARACTERS %s ;" % params)
|
||||
t.run_build_system("-ffile.jam", status=1)
|
||||
t.run_build_system(["-ffile.jam"], status=1)
|
||||
t.expect_output_line("[*] %s" % expected_error_line)
|
||||
t.cleanup()
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ void sub3() {}
|
||||
|
||||
# 'clean' should not remove files under separate jamroot.jam.
|
||||
t.run_build_system()
|
||||
t.run_build_system("--clean")
|
||||
t.run_build_system(["--clean"])
|
||||
t.expect_removal("bin/$toolset/debug/a.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1_2.obj")
|
||||
@@ -57,7 +57,7 @@ t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
|
||||
|
||||
# 'clean-all' removes everything it can reach.
|
||||
t.run_build_system()
|
||||
t.run_build_system("--clean-all")
|
||||
t.run_build_system(["--clean-all"])
|
||||
t.expect_removal("bin/$toolset/debug/a.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1_2.obj")
|
||||
@@ -66,7 +66,7 @@ t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
|
||||
|
||||
# 'clean' together with project target removes only under that project.
|
||||
t.run_build_system()
|
||||
t.run_build_system("sub1 --clean")
|
||||
t.run_build_system(["sub1", "--clean"])
|
||||
t.expect_nothing("bin/$toolset/debug/a.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1_2.obj")
|
||||
@@ -75,7 +75,7 @@ t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
|
||||
|
||||
# 'clean-all' removes everything.
|
||||
t.run_build_system()
|
||||
t.run_build_system("sub1 --clean-all")
|
||||
t.run_build_system(["sub1", "--clean-all"])
|
||||
t.expect_nothing("bin/$toolset/debug/a.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1.obj")
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1_2.obj")
|
||||
@@ -85,7 +85,7 @@ t.expect_nothing("sub3/bin/$toolset/debug/sub3.obj")
|
||||
# If main target is explicitly named, we should not remove files from other
|
||||
# targets.
|
||||
t.run_build_system()
|
||||
t.run_build_system("sub1//sub1 --clean")
|
||||
t.run_build_system(["sub1//sub1", "--clean"])
|
||||
t.expect_removal("sub1/bin/$toolset/debug/sub1.obj")
|
||||
t.expect_nothing("sub1/bin/$toolset/debug/sub1_2.obj")
|
||||
t.expect_nothing("sub2/bin/$toolset/debug/sub2.obj")
|
||||
@@ -98,7 +98,7 @@ import cast ;
|
||||
cast a cpp : a.h ;
|
||||
""")
|
||||
t.write("a.h", "")
|
||||
t.run_build_system("--clean")
|
||||
t.run_build_system(["--clean"])
|
||||
t.expect_nothing("a.h")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -223,7 +223,7 @@ def _collectDebugInfo_environ(t):
|
||||
|
||||
|
||||
def _getExternalValues(t, *args):
|
||||
t.run_build_system(" ".join("---var-name=%s" % x for x in args))
|
||||
t.run_build_system(["---var-name=%s" % x for x in args])
|
||||
result = dict()
|
||||
for x in args:
|
||||
m = re.search(r"^\*\*\*ENV\*\*\* %s: '(.*)' \*\*\*$" % x, t.stdout(),
|
||||
@@ -239,7 +239,7 @@ def _getJamVersionInfo(t):
|
||||
result = []
|
||||
|
||||
# JAM version variables.
|
||||
t.run_build_system("---version")
|
||||
t.run_build_system(["---version"])
|
||||
for m in re.finditer(r"^\*\*\*VAR\*\*\* ([^:]*): (.*)\*\*\*$", t.stdout(),
|
||||
re.MULTILINE):
|
||||
name = m.group(1)
|
||||
@@ -254,12 +254,12 @@ def _getJamVersionInfo(t):
|
||||
result.append("")
|
||||
|
||||
# bjam -v output.
|
||||
t.run_build_system("-v")
|
||||
t.run_build_system(["-v"])
|
||||
result.append("--- output for 'bjam -v' ---")
|
||||
result.append(t.stdout())
|
||||
|
||||
# bjam --version output.
|
||||
t.run_build_system("--version", status=1)
|
||||
t.run_build_system(["--version"], status=1)
|
||||
result.append("--- output for 'bjam --version' ---")
|
||||
result.append(t.stdout())
|
||||
|
||||
@@ -269,7 +269,7 @@ def _getJamVersionInfo(t):
|
||||
def _init():
|
||||
toolsetName = "__myDummyToolset__"
|
||||
|
||||
t = BoostBuild.Tester("toolset=%s" % toolsetName, pass_toolset=False,
|
||||
t = BoostBuild.Tester(["toolset=%s" % toolsetName], pass_toolset=False,
|
||||
use_test_config=False)
|
||||
|
||||
# Prepare a dummy toolset so we do not get errors in case the default one
|
||||
|
||||
@@ -21,7 +21,7 @@ int main() {}
|
||||
|
||||
# Test conditionals in target requirements.
|
||||
t.write("jamroot.jam", "exe a : a.cpp : <link>static:<define>STATIC ;")
|
||||
t.run_build_system("link=static")
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a.exe")
|
||||
t.rm("bin")
|
||||
|
||||
@@ -30,7 +30,7 @@ t.write("jamroot.jam", """
|
||||
project : requirements <link>static:<define>STATIC ;
|
||||
exe a : a.cpp ;
|
||||
""")
|
||||
t.run_build_system("link=static")
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a.exe")
|
||||
t.rm("bin")
|
||||
|
||||
@@ -41,7 +41,7 @@ lib l : l.cpp : : : <link>static:<define>STATIC ;
|
||||
exe a : a.cpp l ;
|
||||
""")
|
||||
t.write("l.cpp", "int i;")
|
||||
t.run_build_system("link=static")
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a.exe")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -20,8 +20,8 @@ import BoostBuild
|
||||
def test_multiple_conditions():
|
||||
"""Basic tests for properties conditioned on multiple other properties."""
|
||||
|
||||
t = BoostBuild.Tester("--user-config= --ignore-site-config "
|
||||
"toolset=testToolset", pass_toolset=False, use_test_config=False)
|
||||
t = BoostBuild.Tester(["--user-config=", "--ignore-site-config",
|
||||
"toolset=testToolset"], pass_toolset=False, use_test_config=False)
|
||||
|
||||
t.write("testToolset.jam", """\
|
||||
import feature ;
|
||||
@@ -69,7 +69,7 @@ notfile testTarget1 : @buildRule : :
|
||||
<aaa>1,<bbb>1,<ccc>1:<description>a1-b1-c1 ;
|
||||
""")
|
||||
|
||||
t.run_build_system("aaa=1 bbb=1 ccc=1")
|
||||
t.run_build_system(["aaa=1", "bbb=1", "ccc=1"])
|
||||
t.expect_output_line("description: /d/" )
|
||||
t.expect_output_line("description: /a0/" , False)
|
||||
t.expect_output_line("description: /a1/" )
|
||||
@@ -84,7 +84,7 @@ notfile testTarget1 : @buildRule : :
|
||||
t.expect_output_line("description: /a1-b1-c0/", False)
|
||||
t.expect_output_line("description: /a1-b1-c1/" )
|
||||
|
||||
t.run_build_system("aaa=0 bbb=0 ccc=1")
|
||||
t.run_build_system(["aaa=0", "bbb=0", "ccc=1"])
|
||||
t.expect_output_line("description: /d/" )
|
||||
t.expect_output_line("description: /a0/" )
|
||||
t.expect_output_line("description: /a1/" , False)
|
||||
@@ -99,7 +99,7 @@ notfile testTarget1 : @buildRule : :
|
||||
t.expect_output_line("description: /a1-b1-c0/", False)
|
||||
t.expect_output_line("description: /a1-b1-c1/", False)
|
||||
|
||||
t.run_build_system("aaa=0 bbb=0 ccc=0")
|
||||
t.run_build_system(["aaa=0", "bbb=0", "ccc=0"])
|
||||
t.expect_output_line("description: /d/" )
|
||||
t.expect_output_line("description: /a0/" )
|
||||
t.expect_output_line("description: /a1/" , False)
|
||||
@@ -132,7 +132,7 @@ def test_multiple_conditions_with_toolset_version():
|
||||
"""
|
||||
toolset = "testToolset" ;
|
||||
|
||||
t = BoostBuild.Tester("--user-config= --ignore-site-config",
|
||||
t = BoostBuild.Tester(["--user-config=", "--ignore-site-config"],
|
||||
pass_toolset=False, use_test_config=False)
|
||||
|
||||
t.write(toolset + ".jam", """\
|
||||
@@ -221,7 +221,7 @@ notfile testTarget1 : @buildRule : :
|
||||
<bbb>1,<aaa>1,<toolset>testToolset-1:<description>b1-a1-t1 ;
|
||||
""")
|
||||
|
||||
t.run_build_system("aaa=1 bbb=1 ccc=1 toolset=%s-0" % toolset)
|
||||
t.run_build_system(["aaa=1", "bbb=1", "ccc=1", "toolset=%s-0" % toolset])
|
||||
t.expect_output_line("description: /t-a0/" , False)
|
||||
t.expect_output_line("description: /t-a1/" )
|
||||
t.expect_output_line("description: /t0-a0/" , False)
|
||||
@@ -259,7 +259,7 @@ notfile testTarget1 : @buildRule : :
|
||||
t.expect_output_line("description: /b1-a1-t0/" )
|
||||
t.expect_output_line("description: /b1-a1-t1/", False)
|
||||
|
||||
t.run_build_system("aaa=1 bbb=1 ccc=1 toolset=%s-1" % toolset)
|
||||
t.run_build_system(["aaa=1", "bbb=1", "ccc=1", "toolset=%s-1" % toolset])
|
||||
t.expect_output_line("description: /t-a0/" , False)
|
||||
t.expect_output_line("description: /t-a1/" )
|
||||
t.expect_output_line("description: /t0-a0/" , False)
|
||||
|
||||
@@ -36,8 +36,8 @@ def test_user_configuration():
|
||||
configFileNames = ["ups_lala_1.jam", "ups_lala_2.jam",
|
||||
os.path.join(subdirName, "ups_lala_3.jam")]
|
||||
|
||||
t = BoostBuild.Tester("toolset=%s --debug-configuration" % toolsetName,
|
||||
pass_toolset=False, use_test_config=False)
|
||||
t = BoostBuild.Tester(["toolset=%s" % toolsetName,
|
||||
"--debug-configuration"], pass_toolset=False, use_test_config=False)
|
||||
|
||||
for configFileName in configFileNames:
|
||||
message = "ECHO \"%s\" ;" % testMessage % configFileName
|
||||
@@ -75,12 +75,14 @@ ECHO test-index: $(test-index:E=(unknown)) ;
|
||||
"- %s" % message)
|
||||
self.__tester.fail_test(1)
|
||||
|
||||
def __call__(self, test_id, env, extra_args="", *args, **kwargs):
|
||||
def __call__(self, test_id, env, extra_args=None, *args, **kwargs):
|
||||
if env == "" and not canSetEmptyEnvironmentVariable:
|
||||
self.__assertionFailure("Can not set empty environment "
|
||||
"variables on this platform.")
|
||||
self.__registerTestId(str(test_id))
|
||||
extra_args += " ---test-id---=%s" % test_id
|
||||
if extra_args is None:
|
||||
extra_args = []
|
||||
extra_args.append("---test-id---=%s" % test_id)
|
||||
env_name = "BOOST_BUILD_USER_CONFIG"
|
||||
previous_env = os.environ.get(env_name)
|
||||
_env_set(env_name, env)
|
||||
@@ -104,7 +106,7 @@ ECHO test-index: $(test-index:E=(unknown)) ;
|
||||
t.expect_output_line(testMessage % configFileNames[1], False)
|
||||
t.expect_output_line(testMessage % configFileNames[2], False)
|
||||
|
||||
test(2, None, "--user-config=")
|
||||
test(2, None, ["--user-config="])
|
||||
t.expect_output_line(implicitConfigLoadMessage, False)
|
||||
t.expect_output_line(explicitConfigLoadMessage, False)
|
||||
t.expect_output_line(disabledConfigLoadMessage)
|
||||
@@ -112,7 +114,7 @@ ECHO test-index: $(test-index:E=(unknown)) ;
|
||||
t.expect_output_line(testMessage % configFileNames[1], False)
|
||||
t.expect_output_line(testMessage % configFileNames[2], False)
|
||||
|
||||
test(3, None, '--user-config=""')
|
||||
test(3, None, ['--user-config=""'])
|
||||
t.expect_output_line(implicitConfigLoadMessage, False)
|
||||
t.expect_output_line(explicitConfigLoadMessage, False)
|
||||
t.expect_output_line(disabledConfigLoadMessage)
|
||||
@@ -120,7 +122,7 @@ ECHO test-index: $(test-index:E=(unknown)) ;
|
||||
t.expect_output_line(testMessage % configFileNames[1], False)
|
||||
t.expect_output_line(testMessage % configFileNames[2], False)
|
||||
|
||||
test(4, None, '--user-config="%s"' % configFileNames[0])
|
||||
test(4, None, ['--user-config="%s"' % configFileNames[0]])
|
||||
t.expect_output_line(implicitConfigLoadMessage, False)
|
||||
t.expect_output_line(explicitConfigLoadMessage)
|
||||
t.expect_output_line(disabledConfigLoadMessage, False)
|
||||
@@ -128,7 +130,7 @@ ECHO test-index: $(test-index:E=(unknown)) ;
|
||||
t.expect_output_line(testMessage % configFileNames[1], False)
|
||||
t.expect_output_line(testMessage % configFileNames[2], False)
|
||||
|
||||
test(5, None, '--user-config="%s"' % configFileNames[2])
|
||||
test(5, None, ['--user-config="%s"' % configFileNames[2]])
|
||||
t.expect_output_line(implicitConfigLoadMessage, False)
|
||||
t.expect_output_line(explicitConfigLoadMessage)
|
||||
t.expect_output_line(disabledConfigLoadMessage, False)
|
||||
@@ -136,7 +138,7 @@ ECHO test-index: $(test-index:E=(unknown)) ;
|
||||
t.expect_output_line(testMessage % configFileNames[1], False)
|
||||
t.expect_output_line(testMessage % configFileNames[2])
|
||||
|
||||
test(6, None, '--user-config="%s"' % os.path.abspath(configFileNames[1]))
|
||||
test(6, None, ['--user-config="%s"' % os.path.abspath(configFileNames[1])])
|
||||
t.expect_output_line(implicitConfigLoadMessage, False)
|
||||
t.expect_output_line(explicitConfigLoadMessage)
|
||||
t.expect_output_line(disabledConfigLoadMessage, False)
|
||||
@@ -144,7 +146,7 @@ ECHO test-index: $(test-index:E=(unknown)) ;
|
||||
t.expect_output_line(testMessage % configFileNames[1])
|
||||
t.expect_output_line(testMessage % configFileNames[2], False)
|
||||
|
||||
test(7, None, '--user-config="%s"' % os.path.abspath(configFileNames[2]))
|
||||
test(7, None, ['--user-config="%s"' % os.path.abspath(configFileNames[2])])
|
||||
t.expect_output_line(implicitConfigLoadMessage, False)
|
||||
t.expect_output_line(explicitConfigLoadMessage)
|
||||
t.expect_output_line(disabledConfigLoadMessage, False)
|
||||
@@ -177,7 +179,7 @@ ECHO test-index: $(test-index:E=(unknown)) ;
|
||||
t.expect_output_line(testMessage % configFileNames[1])
|
||||
t.expect_output_line(testMessage % configFileNames[2], False)
|
||||
|
||||
test(11, configFileNames[1], '--user-config=""')
|
||||
test(11, configFileNames[1], ['--user-config=""'])
|
||||
t.expect_output_line(implicitConfigLoadMessage, False)
|
||||
t.expect_output_line(explicitConfigLoadMessage, False)
|
||||
t.expect_output_line(disabledConfigLoadMessage)
|
||||
@@ -185,7 +187,7 @@ ECHO test-index: $(test-index:E=(unknown)) ;
|
||||
t.expect_output_line(testMessage % configFileNames[1], False)
|
||||
t.expect_output_line(testMessage % configFileNames[2], False)
|
||||
|
||||
test(12, configFileNames[1], '--user-config="%s"' % configFileNames[0])
|
||||
test(12, configFileNames[1], ['--user-config="%s"' % configFileNames[0]])
|
||||
t.expect_output_line(implicitConfigLoadMessage, False)
|
||||
t.expect_output_line(explicitConfigLoadMessage)
|
||||
t.expect_output_line(disabledConfigLoadMessage, False)
|
||||
@@ -194,7 +196,7 @@ ECHO test-index: $(test-index:E=(unknown)) ;
|
||||
t.expect_output_line(testMessage % configFileNames[2], False)
|
||||
|
||||
if canSetEmptyEnvironmentVariable:
|
||||
test(13, "", '--user-config="%s"' % configFileNames[0])
|
||||
test(13, "", ['--user-config="%s"' % configFileNames[0]])
|
||||
t.expect_output_line(implicitConfigLoadMessage, False)
|
||||
t.expect_output_line(explicitConfigLoadMessage)
|
||||
t.expect_output_line(disabledConfigLoadMessage, False)
|
||||
@@ -202,7 +204,7 @@ ECHO test-index: $(test-index:E=(unknown)) ;
|
||||
t.expect_output_line(testMessage % configFileNames[1], False)
|
||||
t.expect_output_line(testMessage % configFileNames[2], False)
|
||||
|
||||
test(14, '""', '--user-config="%s"' % configFileNames[0])
|
||||
test(14, '""', ['--user-config="%s"' % configFileNames[0]])
|
||||
t.expect_output_line(implicitConfigLoadMessage, False)
|
||||
t.expect_output_line(explicitConfigLoadMessage)
|
||||
t.expect_output_line(disabledConfigLoadMessage, False)
|
||||
@@ -210,7 +212,7 @@ ECHO test-index: $(test-index:E=(unknown)) ;
|
||||
t.expect_output_line(testMessage % configFileNames[1], False)
|
||||
t.expect_output_line(testMessage % configFileNames[2], False)
|
||||
|
||||
test(15, "invalid", '--user-config="%s"' % configFileNames[0])
|
||||
test(15, "invalid", ['--user-config="%s"' % configFileNames[0]])
|
||||
t.expect_output_line(implicitConfigLoadMessage, False)
|
||||
t.expect_output_line(explicitConfigLoadMessage)
|
||||
t.expect_output_line(disabledConfigLoadMessage, False)
|
||||
@@ -274,7 +276,7 @@ def _env_set(name, value):
|
||||
def _getExternalEnv(name):
|
||||
toolsetName = "__myDummyToolset__"
|
||||
|
||||
t = BoostBuild.Tester("toolset=%s" % toolsetName, pass_toolset=False,
|
||||
t = BoostBuild.Tester(["toolset=%s" % toolsetName], pass_toolset=False,
|
||||
use_test_config=False)
|
||||
try:
|
||||
# Prepare a dummy toolset so we do not get errors in case the default
|
||||
@@ -302,7 +304,7 @@ for x in $(names)
|
||||
}
|
||||
""")
|
||||
|
||||
t.run_build_system("---var-name---=%s" % name)
|
||||
t.run_build_system(["---var-name---=%s" % name])
|
||||
m = re.search("^### %s: '(.*)' ###$" % name, t.stdout(), re.MULTILINE)
|
||||
if m:
|
||||
return m.group(1)
|
||||
|
||||
@@ -62,7 +62,7 @@ if test2src != test2dest:
|
||||
"correctly")
|
||||
tester.fail_test(1)
|
||||
|
||||
tester.run_build_system("-d1")
|
||||
tester.run_build_system(["-d1"])
|
||||
tester.expect_output_line("common.copy*", expected_to_exist=False)
|
||||
tester.expect_nothing_more()
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import BoostBuild
|
||||
|
||||
t = BoostBuild.Tester("-d1", pass_d0=False, pass_toolset=False)
|
||||
t = BoostBuild.Tester(["-d1"], pass_d0=False, pass_toolset=False)
|
||||
|
||||
t.write("file.jam", """\
|
||||
prefix = "echo \\"" ;
|
||||
@@ -28,31 +28,31 @@ ALWAYS all ;
|
||||
go all ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -sXXX=1", stderr="")
|
||||
t.run_build_system(["-ffile.jam", "-sXXX=1"], stderr="")
|
||||
t.expect_output_line("{{{ 1 }}}")
|
||||
t.expect_output_line("stdout")
|
||||
t.expect_output_line("stderr")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system("-ffile.jam -sXXX=2 -p0", stderr="")
|
||||
t.run_build_system(["-ffile.jam", "-sXXX=2", "-p0"], stderr="")
|
||||
t.expect_output_line("{{{ 2 }}}")
|
||||
t.expect_output_line("stdout")
|
||||
t.expect_output_line("stderr")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system("-ffile.jam -sXXX=3 -p1", stderr="")
|
||||
t.run_build_system(["-ffile.jam", "-sXXX=3", "-p1"], stderr="")
|
||||
t.expect_output_line("{{{ 3 }}}")
|
||||
t.expect_output_line("stdout")
|
||||
t.expect_output_line("stderr*", False)
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system("-ffile.jam -sXXX=4 -p2", stderr="stderr\n")
|
||||
t.run_build_system(["-ffile.jam", "-sXXX=4", "-p2"], stderr="stderr\n")
|
||||
t.expect_output_line("{{{ 4 }}}")
|
||||
t.expect_output_line("stdout*", False)
|
||||
t.expect_output_line("stderr*", False)
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system("-ffile.jam -sXXX=5 -p3", stderr="stderr\n")
|
||||
t.run_build_system(["-ffile.jam", "-sXXX=5", "-p3"], stderr="stderr\n")
|
||||
t.expect_output_line("{{{ 5 }}}")
|
||||
t.expect_output_line("stdout")
|
||||
t.expect_output_line("stderr", False)
|
||||
|
||||
@@ -22,6 +22,6 @@ NOTFILE subtest ;
|
||||
DEPENDS all : subtest_a ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -sACTION=invalid", status=1)
|
||||
t.run_build_system(["-ffile.jam", "-sACTION=invalid"], status=1)
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -28,7 +28,7 @@ NOTFILE subtest ;
|
||||
DEPENDS all : subtest_a subtest_b ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -d2", stdout="""\
|
||||
t.run_build_system(["-ffile.jam", "-d2"], stdout="""\
|
||||
...found 4 targets...
|
||||
...updating 2 targets...
|
||||
.a. subtest_a
|
||||
@@ -52,7 +52,7 @@ echo [subtest_b] 2
|
||||
...updated 2 targets...
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -d1", stdout="""\
|
||||
t.run_build_system(["-ffile.jam", "-d1"], stdout="""\
|
||||
...found 4 targets...
|
||||
...updating 2 targets...
|
||||
...updated 2 targets...
|
||||
|
||||
@@ -17,7 +17,7 @@ def test(t, type, input, output, status=0):
|
||||
if input: code.append(input)
|
||||
code.append(";")
|
||||
t.write("file.jam", " ".join(code))
|
||||
t.run_build_system("-ffile.jam", status=status)
|
||||
t.run_build_system(["-ffile.jam"], status=status)
|
||||
t.expect_output_line(output);
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import BoostBuild
|
||||
import os
|
||||
|
||||
t = BoostBuild.Tester("-ffile.jam", pass_toolset=0)
|
||||
t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
|
||||
|
||||
t.write("file.jam", """\
|
||||
name = n1 n2 ;
|
||||
@@ -30,7 +30,7 @@ actions run { echo file: "@(o$(name) .txt:E= test -D$(contents))" }
|
||||
run all ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-d2")
|
||||
t.run_build_system(["-d2"])
|
||||
t.expect_output_line('echo file: "on1 on2 .txt"');
|
||||
t.expect_addition("on1 on2 .txt")
|
||||
t.expect_content("on1 on2 .txt", " test -DM1 -DM2", True)
|
||||
@@ -45,7 +45,7 @@ actions run { $(file) }
|
||||
run all ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-d1")
|
||||
t.run_build_system(["-d1"])
|
||||
t.expect_output_line(" test -DM1 -DM2")
|
||||
|
||||
t.rm(".")
|
||||
@@ -57,7 +57,7 @@ actions run { @($(STDOUT):E= test -D$(contents)\n) }
|
||||
run all ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-d1")
|
||||
t.run_build_system(["-d1"])
|
||||
t.expect_output_line(" test -DM1 -DM2")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -36,7 +36,7 @@ rule bind-rule ( target : path )
|
||||
DEPENDS all : fake-target ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam", stdout="""\
|
||||
t.run_build_system(["-ffile.jam"], stdout="""\
|
||||
found: all at all
|
||||
found: file-to-bind at subdir1%sfile-to-bind
|
||||
...found 3 targets...
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import BoostBuild
|
||||
|
||||
t = BoostBuild.Tester("-ffile.jam", pass_toolset=0)
|
||||
t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
|
||||
|
||||
t.write("file.jam", """
|
||||
actions a { }
|
||||
@@ -18,13 +18,13 @@ a all ;
|
||||
b all ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-d0", stdout="")
|
||||
t.run_build_system(["-d0"], stdout="")
|
||||
|
||||
t.run_build_system("-d1")
|
||||
t.run_build_system(["-d1"])
|
||||
t.expect_output_line("a all")
|
||||
t.expect_output_line("b all", False)
|
||||
|
||||
t.run_build_system("-d2")
|
||||
t.run_build_system(["-d2"])
|
||||
t.expect_output_line("a all")
|
||||
t.expect_output_line("b all")
|
||||
|
||||
|
||||
@@ -47,5 +47,5 @@ DEPENDS all : xx ;
|
||||
NOTFILE xx ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam", status=0)
|
||||
t.run_build_system(["-ffile.jam"], status=0)
|
||||
t.cleanup()
|
||||
|
||||
@@ -70,7 +70,7 @@ actions do-nothing { }
|
||||
do-nothing all ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-fcode", stdout="""\
|
||||
t.run_build_system(["-fcode"], stdout="""\
|
||||
R1
|
||||
R2
|
||||
L1
|
||||
|
||||
@@ -8,5 +8,5 @@ import BoostBuild
|
||||
|
||||
t = BoostBuild.Tester(pass_toolset=0)
|
||||
t.set_tree("core-language")
|
||||
t.run_build_system("-ftest.jam")
|
||||
t.run_build_system(["-ftest.jam"])
|
||||
t.cleanup()
|
||||
|
||||
@@ -38,18 +38,27 @@ def string_of_length(n):
|
||||
# content and always requires at least a single whitespace after the opening
|
||||
# brace in order to satisfy its Boost Jam language grammar rules.
|
||||
def test_raw_empty():
|
||||
whitespace = " \n\n\r\r\v\v\t\t \t \r\r \n\n"
|
||||
t = BoostBuild.Tester("-d2 -d+4", pass_d0=False, pass_toolset=0,
|
||||
whitespace_in = " \n\n\r\r\v\v\t\t \t \r\r \n\n"
|
||||
|
||||
# We tell the testing system to read its child process output as raw
|
||||
# binary data but the bjam process we run will read its input file and
|
||||
# write out its output as text, i.e. convert all of our "\r\n" sequences to
|
||||
# "\n" on input and all of its "\n" characters back to "\r\n" on output.
|
||||
# This means that any lone "\n" input characters not preceded by "\r" will
|
||||
# get an extra "\r" added in front of it on output.
|
||||
whitespace_out = whitespace_in.replace("\r\n", "\n").replace("\n", "\r\n")
|
||||
|
||||
t = BoostBuild.Tester(["-d2", "-d+4"], pass_d0=False, pass_toolset=0,
|
||||
use_test_config=False)
|
||||
t.write("file.jam", """\
|
||||
actions do_empty {%s}
|
||||
JAMSHELL = %% ;
|
||||
do_empty all ;
|
||||
""" % (whitespace))
|
||||
t.run_build_system("-ffile.jam")
|
||||
""" % (whitespace_in))
|
||||
t.run_build_system(["-ffile.jam"], universal_newlines=False)
|
||||
t.expect_output_line("do_empty all")
|
||||
t.expect_output_line("Executing raw command directly", False)
|
||||
if "\n%s\n" % whitespace not in t.stdout():
|
||||
if "\r\n%s\r\n" % whitespace_out not in t.stdout():
|
||||
BoostBuild.annotation("failure", "Whitespace action content not found "
|
||||
"on stdout.")
|
||||
t.fail_test(1, dump_difference=False)
|
||||
@@ -57,7 +66,7 @@ do_empty all ;
|
||||
|
||||
|
||||
def test_raw_nt(n=None, error=False):
|
||||
t = BoostBuild.Tester("-d1 -d+4", pass_d0=False, pass_toolset=0,
|
||||
t = BoostBuild.Tester(["-d1", "-d+4"], pass_d0=False, pass_toolset=0,
|
||||
use_test_config=False)
|
||||
|
||||
cmd_prefix = "%s -c \"print('XXX: " % executable
|
||||
@@ -100,7 +109,7 @@ do_echo all ;
|
||||
expected_status = 1
|
||||
else:
|
||||
expected_status = 0
|
||||
t.run_build_system("-ffile.jam", status=expected_status)
|
||||
t.run_build_system(["-ffile.jam"], status=expected_status)
|
||||
if error:
|
||||
t.expect_output_line("Executing raw command directly", False)
|
||||
t.expect_output_line("do_echo action is too long (%d, max 32766):" % n)
|
||||
@@ -124,7 +133,7 @@ do_echo all ;
|
||||
|
||||
|
||||
def test_raw_to_shell_fallback_nt():
|
||||
t = BoostBuild.Tester("-d1 -d+4", pass_d0=False, pass_toolset=0,
|
||||
t = BoostBuild.Tester(["-d1", "-d+4"], pass_d0=False, pass_toolset=0,
|
||||
use_test_config=False)
|
||||
|
||||
cmd_prefix = '%s -c print(' % executable
|
||||
@@ -141,7 +150,7 @@ actions do_multiline
|
||||
JAMSHELL = % ;
|
||||
do_multiline all ;
|
||||
""")
|
||||
t.run_build_system("-ffile_multiline.jam")
|
||||
t.run_build_system(["-ffile_multiline.jam"])
|
||||
t.expect_output_line("do_multiline all")
|
||||
t.expect_output_line("one")
|
||||
t.expect_output_line("two")
|
||||
@@ -154,7 +163,7 @@ actions do_redirect { echo one > two.txt }
|
||||
JAMSHELL = % ;
|
||||
do_redirect all ;
|
||||
""")
|
||||
t.run_build_system("-ffile_redirect.jam")
|
||||
t.run_build_system(["-ffile_redirect.jam"])
|
||||
t.expect_output_line("do_redirect all")
|
||||
t.expect_output_line("one", False)
|
||||
t.expect_output_line("Executing raw command directly", False)
|
||||
@@ -167,7 +176,7 @@ actions do_pipe { echo one | echo two }
|
||||
JAMSHELL = % ;
|
||||
do_pipe all ;
|
||||
""")
|
||||
t.run_build_system("-ffile_pipe.jam")
|
||||
t.run_build_system(["-ffile_pipe.jam"])
|
||||
t.expect_output_line("do_pipe all")
|
||||
t.expect_output_line("one", False)
|
||||
t.expect_output_line("two")
|
||||
@@ -180,7 +189,7 @@ actions do_single_quoted { %s'5>10'%s }
|
||||
JAMSHELL = %% ;
|
||||
do_single_quoted all ;
|
||||
""" % (cmd_prefix, cmd_suffix))
|
||||
t.run_build_system("-ffile_single_quoted.jam")
|
||||
t.run_build_system(["-ffile_single_quoted.jam"])
|
||||
t.expect_output_line("do_single_quoted all")
|
||||
t.expect_output_line("5>10")
|
||||
t.expect_output_line("Executing raw command directly")
|
||||
@@ -193,7 +202,7 @@ actions do_double_quoted { %s"5>10"%s }
|
||||
JAMSHELL = %% ;
|
||||
do_double_quoted all ;
|
||||
""" % (cmd_prefix, cmd_suffix))
|
||||
t.run_build_system("-ffile_double_quoted.jam")
|
||||
t.run_build_system(["-ffile_double_quoted.jam"])
|
||||
t.expect_output_line("do_double_quoted all")
|
||||
# The difference between this example and the similar previous one using
|
||||
# single instead of double quotes stems from how the used Python executable
|
||||
@@ -209,7 +218,7 @@ actions do_escaped_quote { %s\\"5>10\\"%s }
|
||||
JAMSHELL = %% ;
|
||||
do_escaped_quote all ;
|
||||
""" % (cmd_prefix, cmd_suffix))
|
||||
t.run_build_system("-ffile_escaped_quote.jam")
|
||||
t.run_build_system(["-ffile_escaped_quote.jam"])
|
||||
t.expect_output_line("do_escaped_quote all")
|
||||
t.expect_output_line("5>10")
|
||||
t.expect_output_line("Executing raw command directly", False)
|
||||
|
||||
@@ -28,7 +28,7 @@ NOTFILE subtest ;
|
||||
DEPENDS all : subtest_a subtest_b ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -d2", stdout="""\
|
||||
t.run_build_system(["-ffile.jam", "-d2"], stdout="""\
|
||||
...found 4 targets...
|
||||
...updating 2 targets...
|
||||
.a. subtest_a
|
||||
|
||||
@@ -37,7 +37,7 @@ echo 002
|
||||
DEPENDS all : sleeper ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -d1 -l2", status=1)
|
||||
t.run_build_system(["-ffile.jam", "-d1", "-l2"], status=1)
|
||||
t.expect_output_line("2 second time limit exceeded")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -29,7 +29,7 @@ FAIL_EXPECTED subtest_b ;
|
||||
DEPENDS all : subtest_a subtest_b ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -n", stdout="""\
|
||||
t.run_build_system(["-ffile.jam", "-n"], stdout="""\
|
||||
...found 4 targets...
|
||||
...updating 2 targets...
|
||||
.a. subtest_a
|
||||
|
||||
@@ -62,7 +62,7 @@ DEPENDS bottom : 1.b 2.b 3.b 4.b ;
|
||||
DEPENDS all : bottom ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -j4", stdout="""\
|
||||
t.run_build_system(["-ffile.jam", "-j4"], stdout="""\
|
||||
...found 12 targets...
|
||||
...updating 8 targets...
|
||||
sleeper 1.a
|
||||
|
||||
@@ -54,7 +54,7 @@ DEPENDS g1.generated g2.generated : root ;
|
||||
DEPENDS all : u1.user u2.user ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -j2", stdout="""\
|
||||
t.run_build_system(["-ffile.jam", "-j2"], stdout="""\
|
||||
...found 6 targets...
|
||||
...updating 4 targets...
|
||||
.gen. g1.generated
|
||||
|
||||
@@ -57,7 +57,7 @@ DEPENDS installed_dll : dll ;
|
||||
DEPENDS all : lib installed_dll ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -j2", stdout="""\
|
||||
t.run_build_system(["-ffile.jam", "-j2"], stdout="""\
|
||||
...found 4 targets...
|
||||
...updating 3 targets...
|
||||
link dll
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import BoostBuild
|
||||
|
||||
t = BoostBuild.Tester("-ffile.jam", pass_toolset=0)
|
||||
t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
|
||||
|
||||
t.write("file.jam", """
|
||||
module .typecheck
|
||||
@@ -33,8 +33,8 @@ actions dummy { }
|
||||
dummy all ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-sARGUMENT=::a/b/c")
|
||||
t.run_build_system("-sARGUMENT=a/b/c", status=1, stdout="""\
|
||||
t.run_build_system(["-sARGUMENT=::a/b/c"])
|
||||
t.run_build_system(["-sARGUMENT=a/b/c"], status=1, stdout="""\
|
||||
Error: a/b/c is not a path
|
||||
file.jam:18: in module scope
|
||||
*** argument error
|
||||
|
||||
@@ -26,7 +26,7 @@ UPDATE_NOW target1 ;
|
||||
DEPENDS all : target1 ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam", stdout="""\
|
||||
t.run_build_system(["-ffile.jam"], stdout="""\
|
||||
...found 1 target...
|
||||
...updating 1 target...
|
||||
do-print target1
|
||||
@@ -56,7 +56,7 @@ UPDATE_NOW target1 : : ignore-minus-n ;
|
||||
DEPENDS all : target1 ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -n", stdout="""\
|
||||
t.run_build_system(["-ffile.jam", "-n"], stdout="""\
|
||||
...found 1 target...
|
||||
...updating 1 target...
|
||||
do-print target1
|
||||
@@ -98,7 +98,7 @@ UPDATE_NOW target1 : : ignore-minus-n ;
|
||||
DEPENDS all : target1 target2 ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -n", stdout="""\
|
||||
t.run_build_system(["-ffile.jam", "-n"], stdout="""\
|
||||
...found 1 target...
|
||||
...updating 1 target...
|
||||
fail target1
|
||||
@@ -137,7 +137,7 @@ UPDATE_NOW target1 : : ignore-minus-n ;
|
||||
DEPENDS all : target1 target2 ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -n", status=1, stdout="""\
|
||||
t.run_build_system(["-ffile.jam", "-n"], status=1, stdout="""\
|
||||
don't know how to make target1
|
||||
...found 1 target...
|
||||
...can't find 1 target...
|
||||
@@ -174,7 +174,7 @@ UPDATE_NOW target1 : : ignore-minus-n ;
|
||||
DEPENDS all : target1 ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam -n", stdout="""\
|
||||
t.run_build_system(["-ffile.jam", "-n"], stdout="""\
|
||||
...found 1 target...
|
||||
...updating 1 target...
|
||||
do-print target1
|
||||
|
||||
@@ -32,7 +32,7 @@ actions dummy
|
||||
|
||||
dummy all ;
|
||||
""")
|
||||
t.run_build_system("-ffile.jam -d1")
|
||||
t.run_build_system(["-ffile.jam", "-d1"])
|
||||
t.expect_output_line("From rule: 1 seconds 2 seconds 3 seconds")
|
||||
t.expect_output_line('*From action: 1" 2" 3" seconds"*')
|
||||
t.cleanup()
|
||||
|
||||
@@ -33,6 +33,6 @@ DEPENDS all : xx ;
|
||||
NOTFILE xx ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-ffile.jam", status=0)
|
||||
t.run_build_system(["-ffile.jam"], status=0)
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -21,13 +21,13 @@ t.expect_addition("bin/$toolset/release/a.exe")
|
||||
|
||||
# Check that explictly-specified build variant supresses default-build.
|
||||
t.rm("bin")
|
||||
t.run_build_system("release")
|
||||
t.run_build_system(["release"])
|
||||
t.expect_addition(BoostBuild.List("bin/$toolset/release/") * "a.exe a.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
# Now check that we can specify explicit build request and default-build will be
|
||||
# combined with it.
|
||||
t.run_build_system("optimization=space")
|
||||
t.run_build_system(["optimization=space"])
|
||||
t.expect_addition("bin/$toolset/debug/optimization-space/a.exe")
|
||||
t.expect_addition("bin/$toolset/release/optimization-space/a.exe")
|
||||
|
||||
@@ -36,7 +36,7 @@ t.write("jamfile.jam", """\
|
||||
exe a : a.cpp : : debug ;
|
||||
exe a : b.cpp : : ;
|
||||
""")
|
||||
t.run_build_system("-n --no-error-backtrace", status=1)
|
||||
t.run_build_system(["-n", "--no-error-backtrace"], status=1)
|
||||
t.fail_test(t.stdout().find("default build must be identical in all alternatives") == -1)
|
||||
|
||||
# Test that default-build must be identical in all alternatives. No Error case,
|
||||
@@ -45,7 +45,7 @@ t.write("jamfile.jam", """\
|
||||
exe a : a.cpp : <variant>debug ;
|
||||
exe a : b.cpp : <variant>release ;
|
||||
""")
|
||||
t.run_build_system("-n --no-error-backtrace", status=0)
|
||||
t.run_build_system(["-n", "--no-error-backtrace"], status=0)
|
||||
|
||||
# Now try a harder example: default build which contains <define> should cause
|
||||
# <define> to be present when "b" is compiled. This happens only if
|
||||
|
||||
@@ -30,7 +30,7 @@ __declspec(dllexport)
|
||||
void foo() {}
|
||||
""")
|
||||
|
||||
t.run_build_system("--no-error-backtrace", status=1)
|
||||
t.run_build_system(["--no-error-backtrace"], status=1)
|
||||
t.fail_test(string.find(t.stdout(), "Duplicate name of actual target") == -1)
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -35,14 +35,14 @@ int __declspec(dllexport) force_implib_creation;
|
||||
# endif
|
||||
""")
|
||||
|
||||
t.run_build_system("define=MACROS")
|
||||
t.run_build_system(["define=MACROS"])
|
||||
t.expect_addition("bin/$toolset/debug/"
|
||||
* (BoostBuild.List("a.obj b.obj b.dll a.exe")))
|
||||
|
||||
|
||||
# When building a debug version, the 'define' still applies.
|
||||
t.rm("bin")
|
||||
t.run_build_system("debug define=MACROS")
|
||||
t.run_build_system(["debug", "define=MACROS"])
|
||||
t.expect_addition("bin/$toolset/debug/"
|
||||
* (BoostBuild.List("a.obj b.obj b.dll a.exe")))
|
||||
|
||||
@@ -53,7 +53,7 @@ exe a : a.cpp b : <variant>debug ;
|
||||
lib b : b.cpp ;
|
||||
""")
|
||||
t.rm("bin")
|
||||
t.run_build_system("release define=MACROS")
|
||||
t.run_build_system(["release", "define=MACROS"])
|
||||
|
||||
|
||||
# Regression test: direct build request was not working when there was more
|
||||
@@ -63,6 +63,6 @@ t.write("jamroot.jam", "")
|
||||
t.write("jamfile.jam", "build-project a ;")
|
||||
t.write("a/jamfile.jam", "build-project b ;")
|
||||
t.write("a/b/jamfile.jam", "")
|
||||
t.run_build_system("release")
|
||||
t.run_build_system(["release"])
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -134,12 +134,12 @@ __declspec(dllexport)
|
||||
bar() {}
|
||||
""")
|
||||
|
||||
t.run_build_system("hardcode-dll-paths=true")
|
||||
t.run_build_system(["hardcode-dll-paths=true"])
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/mp.pathlist")
|
||||
|
||||
es1 = t.adjust_names(["a/bin/$toolset/debug"])[0]
|
||||
es2 = t.adjust_names(["b/bin/$toolset/debug"])[0]
|
||||
es1 = t.adjust_names("a/bin/$toolset/debug")[0]
|
||||
es2 = t.adjust_names("b/bin/$toolset/debug")[0]
|
||||
|
||||
t.expect_content_line("bin/$toolset/debug/mp.pathlist", "*" + es1);
|
||||
t.expect_content_line("bin/$toolset/debug/mp.pathlist", "*" + es2);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import BoostBuild
|
||||
import sys
|
||||
|
||||
t = BoostBuild.Tester('example.python.interpreter="%s"' % sys.executable)
|
||||
t = BoostBuild.Tester(['example.python.interpreter=%s' % sys.executable])
|
||||
t.set_tree("../example/make")
|
||||
t.run_build_system()
|
||||
t.expect_addition(["bin/$toolset/debug/main.cpp"])
|
||||
|
||||
@@ -22,7 +22,7 @@ t.expect_addition(BoostBuild.List("bin/$toolset/debug/hello") * \
|
||||
[".exe", ".obj"])
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system("hello2")
|
||||
t.run_build_system(["hello2"])
|
||||
t.expect_addition("bin/$toolset/debug/hello2.exe")
|
||||
|
||||
t.rm(".")
|
||||
|
||||
@@ -35,7 +35,7 @@ void foo() {}
|
||||
|
||||
# If FOO is not defined when compiling the 'foo' target, we will get a link
|
||||
# error at this point.
|
||||
t.run_build_system("hello define=FOO")
|
||||
t.run_build_system(["hello", "define=FOO"])
|
||||
|
||||
t.expect_addition("bin/$toolset/debug/hello.exe")
|
||||
|
||||
|
||||
@@ -13,12 +13,12 @@ t = BoostBuild.Tester()
|
||||
t.write("jamroot.jam", "lib hello : hello.cpp ;")
|
||||
t.write("hello.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system("runtime-link=static")
|
||||
t.run_build_system(["runtime-link=static"])
|
||||
t.expect_output_line("warning: On gcc, DLLs can not be built with "
|
||||
"'<runtime-link>static'.")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system("link=static runtime-link=static")
|
||||
t.run_build_system(["link=static", "runtime-link=static"])
|
||||
binFolder = "bin/$toolset/debug/link-static/runtime-link-static"
|
||||
t.expect_addition("%s/hello.obj" % binFolder)
|
||||
t.expect_addition("%s/hello.lib" % binFolder)
|
||||
|
||||
@@ -21,7 +21,7 @@ def match_count_is(lines, pattern, expected):
|
||||
t = BoostBuild.Tester()
|
||||
t.set_tree("generators-test")
|
||||
|
||||
t.run_build_system("-d1")
|
||||
t.run_build_system(["-d1"])
|
||||
t.expect_addition("bin/$toolset/debug/" * BoostBuild.List("a.my_exe a.my_obj "
|
||||
"b.my_obj c.tui_h c.cpp c.my_obj d_parser.whl d_lexer.dlp d_parser.cpp "
|
||||
" d_lexer.cpp d_lexer.my_obj d_parser.lr0 d_parser.h d_parser.my_obj "
|
||||
|
||||
@@ -39,13 +39,13 @@ actions link { yfc2-link }
|
||||
t.write("jamfile.jam", "exe a : a.cpp ;")
|
||||
t.write("jamroot.jam", "using yfc1 ;")
|
||||
|
||||
t.run_build_system("-n -d2 yfc1")
|
||||
t.run_build_system(["-n", "-d2", "yfc1"])
|
||||
t.fail_test(string.find(t.stdout(), "yfc1-link") == -1)
|
||||
|
||||
# Make sure we do not have to explicitly 'use' yfc1.
|
||||
t.write("jamroot.jam", "using yfc2 ;")
|
||||
|
||||
t.run_build_system("-n -d2 yfc2")
|
||||
t.run_build_system(["-n", "-d2", "yfc2"])
|
||||
t.fail_test(string.find(t.stdout(), "yfc2-link") == -1)
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -24,7 +24,7 @@ t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a__helper.lib")
|
||||
t.rm("bin/$toolset/debug/link-static/a__helper.lib")
|
||||
|
||||
t.run_build_system("a__helper")
|
||||
t.run_build_system(["a__helper"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/a__helper.lib")
|
||||
|
||||
t.rm("bin")
|
||||
@@ -56,7 +56,7 @@ t.rm("bin")
|
||||
t.run_build_system()
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system("a")
|
||||
t.run_build_system(["a"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/helper.lib")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -53,11 +53,11 @@ foo() { geek(); }
|
||||
|
||||
t.write("b/jamfile.jam", "lib b : b.cpp ../a//a ;")
|
||||
|
||||
t.run_build_system("-d2", stderr=None)
|
||||
t.run_build_system(["-d2"], stderr=None)
|
||||
t.expect_addition("bin/$toolset/debug/main.exe")
|
||||
t.rm(["bin", "a/bin", "b/bin"])
|
||||
|
||||
t.run_build_system("link=static")
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/main.exe")
|
||||
t.rm(["bin", "a/bin", "b/bin"])
|
||||
|
||||
@@ -65,7 +65,7 @@ t.rm(["bin", "a/bin", "b/bin"])
|
||||
# Check that <library> works for static linking.
|
||||
t.write("b/jamfile.jam", "lib b : b.cpp : <library>../a//a ;")
|
||||
|
||||
t.run_build_system("link=static")
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/main.exe")
|
||||
|
||||
t.rm(["bin", "a/bin", "b/bin"])
|
||||
@@ -85,7 +85,7 @@ lib png : z : <name>png ;
|
||||
lib z : : <name>zzz ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-a -d+2", status=None, stderr=None)
|
||||
t.run_build_system(["-a", "-d+2"], status=None, stderr=None)
|
||||
# Try to find the "zzz" string either in response file (for Windows compilers),
|
||||
# or in the standard output.
|
||||
rsp = t.adjust_names("bin/$toolset/debug/main.exe.rsp")[0]
|
||||
|
||||
@@ -17,7 +17,7 @@ lib l : l.cpp main ;
|
||||
t.write("main.cpp", "")
|
||||
t.write("l.cpp", "")
|
||||
|
||||
t.run_build_system("--no-error-backtrace", status=1)
|
||||
t.run_build_system(["--no-error-backtrace"], status=1)
|
||||
t.fail_test(string.find(t.stdout(),
|
||||
"error: Recursion in main target references") == -1)
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ make hello1.cpp : hello.cpp : common.copy ;
|
||||
t.write("dir/hello.cpp", "int main() {}\n")
|
||||
|
||||
# Show only action names.
|
||||
t.run_build_system("-d1 -n")
|
||||
t.run_build_system(["-d1", "-n"])
|
||||
t.fail_test(t.stdout().count("copy") != 1)
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -10,7 +10,7 @@ import BoostBuild
|
||||
import os
|
||||
import re
|
||||
|
||||
t = BoostBuild.Tester("-d+1", pass_toolset=0)
|
||||
t = BoostBuild.Tester(["-d+1"], pass_toolset=0)
|
||||
|
||||
t.set_tree('module-actions')
|
||||
|
||||
|
||||
@@ -28,6 +28,6 @@ void foo() {}
|
||||
|
||||
# 'release' builds should get the NDEBUG define. We use static linking to avoid
|
||||
# messing with imports/exports on Windows.
|
||||
t.run_build_system("link=static release")
|
||||
t.run_build_system(["link=static", "release"])
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -31,7 +31,7 @@ t.write("hello.cpp", """\
|
||||
int main() { std::cout << "Hello!\\n"; }
|
||||
""")
|
||||
|
||||
t.run_build_system("-n -d+2")
|
||||
t.run_build_system(["-n", "-d+2"])
|
||||
|
||||
t.fail_test(string.find(t.stdout(), "echo hi") == -1)
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ exe hello3 : hello.cpp ;
|
||||
""")
|
||||
t.write("p2/hello.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system("p1 p2//hello3")
|
||||
t.run_build_system(["p1", "p2//hello3"])
|
||||
t.expect_addition("p1/bin/$toolset/debug/hello.exe")
|
||||
t.expect_addition("p2/bin/$toolset/debug/hello3.exe")
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import BoostBuild
|
||||
|
||||
t = BoostBuild.Tester("debug release")
|
||||
t = BoostBuild.Tester(["debug", "release"])
|
||||
|
||||
t.set_tree('prebuilt')
|
||||
|
||||
|
||||
@@ -84,13 +84,13 @@ t.expect_touch(["bin/$toolset/debug/a.obj",
|
||||
"bin/$toolset/debug/a.exe",
|
||||
"lib2/bin/$toolset/debug/l.exe"])
|
||||
|
||||
t.run_build_system("release optimization=off,speed")
|
||||
t.run_build_system(["release", "optimization=off,speed"])
|
||||
t.expect_addition(["bin/$toolset/release/a.exe",
|
||||
"bin/$toolset/release/a.obj",
|
||||
"bin/$toolset/release/optimization-off/a.exe",
|
||||
"bin/$toolset/release/optimization-off/a.obj"])
|
||||
|
||||
t.run_build_system("--clean-all")
|
||||
t.run_build_system(["--clean-all"])
|
||||
t.expect_removal(["bin/$toolset/debug/a.obj",
|
||||
"bin/$toolset/debug/a.exe",
|
||||
"lib/bin/$toolset/debug/b.obj",
|
||||
@@ -102,31 +102,31 @@ t.expect_removal(["bin/$toolset/debug/a.obj",
|
||||
|
||||
# Now test target ids in command line.
|
||||
t.set_tree("project-test3")
|
||||
t.run_build_system("lib//b.obj")
|
||||
t.run_build_system(["lib//b.obj"])
|
||||
t.expect_addition("lib/bin/$toolset/debug/b.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system("--clean lib//b.obj")
|
||||
t.run_build_system(["--clean", "lib//b.obj"])
|
||||
t.expect_removal("lib/bin/$toolset/debug/b.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system("lib//b.obj")
|
||||
t.run_build_system(["lib//b.obj"])
|
||||
t.expect_addition("lib/bin/$toolset/debug/b.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system("release lib2/helper//e.obj /lib3//f.obj")
|
||||
t.run_build_system(["release", "lib2/helper//e.obj", "/lib3//f.obj"])
|
||||
t.expect_addition("lib2/helper/bin/$toolset/release/e.obj")
|
||||
t.expect_addition("lib3/bin/$toolset/release/f.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
# Test project ids in command line work as well.
|
||||
t.set_tree("project-test3")
|
||||
t.run_build_system("/lib2")
|
||||
t.run_build_system(["/lib2"])
|
||||
t.expect_addition("lib2/bin/$toolset/debug/" * BoostBuild.List("c.obj d.obj l.exe"))
|
||||
t.expect_addition("bin/$toolset/debug/a.obj")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.run_build_system("lib")
|
||||
t.run_build_system(["lib"])
|
||||
t.expect_addition("lib/bin/$toolset/debug/" * BoostBuild.List("b.obj m.exe"))
|
||||
t.expect_nothing_more()
|
||||
|
||||
|
||||
@@ -23,6 +23,6 @@ int main() {}
|
||||
#endif
|
||||
""")
|
||||
|
||||
t.run_build_system("debug-AA")
|
||||
t.run_build_system(["debug-AA"])
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import BoostBuild
|
||||
|
||||
t = BoostBuild.Tester("-ffile.jam", pass_toolset=0)
|
||||
t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
|
||||
|
||||
t.write("file.jam", """\
|
||||
rule make
|
||||
@@ -29,12 +29,12 @@ make aux2 : bar ;
|
||||
|
||||
t.write("baz", "nothing")
|
||||
|
||||
t.run_build_system("bar")
|
||||
t.run_build_system(["bar"])
|
||||
t.expect_addition("bar")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.wait_for_time_change_since_last_build()
|
||||
t.run_build_system("foo")
|
||||
t.run_build_system(["foo"])
|
||||
t.expect_touch("bar")
|
||||
t.expect_addition("foo")
|
||||
t.expect_nothing_more()
|
||||
|
||||
@@ -46,7 +46,7 @@ helper() {}
|
||||
""")
|
||||
|
||||
# First test that when outcomes are expected, all .test files are created.
|
||||
t.run_build_system("hardcode-dll-paths=false", stderr=None, status=None)
|
||||
t.run_build_system(["hardcode-dll-paths=false"], stderr=None, status=None)
|
||||
t.expect_addition("bin/c.test/$toolset/debug/c.test")
|
||||
t.expect_addition("bin/c-f.test/$toolset/debug/c-f.test")
|
||||
t.expect_addition("bin/r.test/$toolset/debug/r.test")
|
||||
@@ -83,7 +83,7 @@ time execution : r ;
|
||||
time compilation : c-obj ;
|
||||
""")
|
||||
|
||||
t.run_build_system("hardcode-dll-paths=false")
|
||||
t.run_build_system(["hardcode-dll-paths=false"])
|
||||
t.expect_content("bin/r.test/$toolset/debug/r.output", """\
|
||||
test input
|
||||
EXIT STATUS: 0
|
||||
@@ -104,7 +104,7 @@ run r-f.cpp ;
|
||||
|
||||
t.touch(BoostBuild.List("c.cpp c-f.cpp r.cpp r-f.cpp"))
|
||||
|
||||
t.run_build_system("hardcode-dll-paths=false", stderr=None, status=1)
|
||||
t.run_build_system(["hardcode-dll-paths=false"], stderr=None, status=1)
|
||||
t.expect_removal("bin/c.test/$toolset/debug/c.test")
|
||||
t.expect_removal("bin/c-f.test/$toolset/debug/c-f.test")
|
||||
t.expect_removal("bin/r.test/$toolset/debug/r.test")
|
||||
|
||||
@@ -34,7 +34,7 @@ make header3.h : header3.in : @common.copy ;
|
||||
obj test : test.cpp : <implicit-dependency>header3.h ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-j2")
|
||||
t.run_build_system(["-j2"])
|
||||
t.expect_addition("bin/$toolset/debug/header3.h")
|
||||
t.expect_addition("bin/$toolset/debug/test.obj")
|
||||
t.expect_nothing_more()
|
||||
@@ -71,7 +71,7 @@ obj test : test.cpp :
|
||||
<implicit-dependency>header3.h ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-j2 test")
|
||||
t.run_build_system(["-j2", "test"])
|
||||
t.expect_addition("bin/$toolset/debug/header1.h")
|
||||
t.expect_addition("bin/$toolset/debug/header2.h")
|
||||
t.expect_addition("bin/$toolset/debug/header3.h")
|
||||
@@ -121,7 +121,7 @@ obj test : test.cpp :
|
||||
<implicit-dependency>header3.h ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-j2 test")
|
||||
t.run_build_system(["-j2", "test"])
|
||||
t.expect_addition("bin/$toolset/debug/header1.h")
|
||||
t.expect_addition("bin/$toolset/debug/header2.h")
|
||||
t.expect_addition("bin/$toolset/debug/header3.h")
|
||||
@@ -183,7 +183,7 @@ make header3.h : header3.in : @copy ;
|
||||
exe test : test2.cpp test1.cpp : <implicit-dependency>header3.h ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-j2 test")
|
||||
t.run_build_system(["-j2", "test"])
|
||||
t.expect_addition("bin/$toolset/debug/header3.h")
|
||||
t.expect_addition("bin/$toolset/debug/test1.obj")
|
||||
t.expect_addition("bin/$toolset/debug/test2.obj")
|
||||
@@ -191,7 +191,7 @@ t.expect_addition("bin/$toolset/debug/test.exe")
|
||||
t.expect_nothing_more()
|
||||
|
||||
t.touch("header3.in")
|
||||
t.run_build_system("-j2 test")
|
||||
t.run_build_system(["-j2", "test"])
|
||||
t.expect_touch("bin/$toolset/debug/header3.h")
|
||||
t.expect_touch("bin/$toolset/debug/test1.obj")
|
||||
t.expect_touch("bin/$toolset/debug/test2.obj")
|
||||
@@ -255,7 +255,7 @@ make header2.h : header2.in : @copy ;
|
||||
exe test : test2.cpp test1.cpp : <implicit-dependency>header2.h <include>. ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-j2 test")
|
||||
t.run_build_system(["-j2", "test"])
|
||||
t.expect_addition("bin/$toolset/debug/header2.h")
|
||||
t.expect_addition("bin/$toolset/debug/test1.obj")
|
||||
t.expect_addition("bin/$toolset/debug/test2.obj")
|
||||
|
||||
@@ -27,7 +27,7 @@ t.run_build_system()
|
||||
t.expect_addition("bin/$toolset/debug/hello.obj")
|
||||
|
||||
t.touch("hello.cpp")
|
||||
t.run_build_system("s")
|
||||
t.run_build_system(["s"])
|
||||
# If 'hello' in the 's' target resolved to file in the current dir, nothing
|
||||
# will be rebuilt.
|
||||
t.expect_touch("bin/$toolset/debug/hello.obj")
|
||||
|
||||
@@ -64,7 +64,7 @@ __declspec(dllexport)
|
||||
helper() { foo(); }
|
||||
""")
|
||||
|
||||
t.run_build_system("-d2")
|
||||
t.run_build_system(["-d2"])
|
||||
t.expect_addition("bin/$toolset/debug/main.exe")
|
||||
t.rm("bin/$toolset/debug/main.exe")
|
||||
|
||||
@@ -142,7 +142,7 @@ lib l : : <name>l_d <variant>debug ;
|
||||
lib l : : <name>l_r <variant>release ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-n")
|
||||
t.run_build_system(["-n"])
|
||||
|
||||
|
||||
# A regression test. Two virtual target with the same properties were created
|
||||
@@ -157,7 +157,7 @@ static-lib a : a.cpp l ;
|
||||
lib l : : <name>l_f ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-n")
|
||||
t.run_build_system(["-n"])
|
||||
|
||||
|
||||
# Make sure plain "lib foobar ; " works.
|
||||
@@ -166,7 +166,7 @@ exe a : a.cpp foobar ;
|
||||
lib foobar ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-n -d2")
|
||||
t.run_build_system(["-n", "-d2"])
|
||||
t.fail_test(string.find(t.stdout(), "foobar") == -1)
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ exe a : a.cpp foo bar ;
|
||||
lib foo bar ;
|
||||
""")
|
||||
|
||||
t.run_build_system("-n -d2")
|
||||
t.run_build_system(["-n", "-d2"])
|
||||
t.fail_test(string.find(t.stdout(), "foo") == -1)
|
||||
t.fail_test(string.find(t.stdout(), "bar") == -1)
|
||||
|
||||
|
||||
@@ -22,6 +22,6 @@ exe b : b.cpp : <foo>2 ;
|
||||
exe c : c.cpp ;
|
||||
""")
|
||||
|
||||
t.run_build_system("foo=1")
|
||||
t.run_build_system(["foo=1"])
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -19,7 +19,7 @@ import BoostBuild
|
||||
|
||||
def testSORTCorrectness():
|
||||
"""Testing that Boost Jam's SORT builtin rule actually sorts correctly."""
|
||||
t = BoostBuild.Tester("-ftest.jam -d1", pass_toolset=False,
|
||||
t = BoostBuild.Tester(["-ftest.jam", "-d1"], pass_toolset=False,
|
||||
use_test_config=False)
|
||||
|
||||
t.write("test.jam", """\
|
||||
@@ -59,7 +59,7 @@ def testSORTDuration():
|
||||
quadratic behaviour again in this use case.
|
||||
|
||||
"""
|
||||
t = BoostBuild.Tester("-ftest.jam -d1", pass_toolset=False,
|
||||
t = BoostBuild.Tester(["-ftest.jam", "-d1"], pass_toolset=False,
|
||||
use_test_config=False)
|
||||
|
||||
f = open(t.workpath("test.jam"), "w")
|
||||
|
||||
@@ -8,12 +8,6 @@
|
||||
|
||||
import BoostBuild
|
||||
|
||||
class unsplit(object):
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
def split(self, ignored):
|
||||
return self.value
|
||||
|
||||
t = BoostBuild.Tester()
|
||||
|
||||
t.write("has space/jamroot.jam", """\
|
||||
@@ -22,6 +16,6 @@ unit-test test : test.cpp ;
|
||||
""")
|
||||
t.write("has space/test.cpp", "int main() {}\n")
|
||||
|
||||
t.run_build_system(unsplit(["has space"]))
|
||||
t.run_build_system(["has space"])
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -50,7 +50,7 @@ stage dist : a : <variant>debug:<location>ds <variant>release:<location>rs ;
|
||||
t.run_build_system()
|
||||
t.expect_addition("ds/a.dll")
|
||||
|
||||
t.run_build_system("release")
|
||||
t.run_build_system(["release"])
|
||||
t.expect_addition("rs/a.dll")
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ stage a2 : a2.txt : <location>dist <dependency>a1 ;
|
||||
""")
|
||||
t.write("a1.txt", "")
|
||||
t.write("a2.txt", "")
|
||||
t.run_build_system("a2")
|
||||
t.run_build_system(["a2"])
|
||||
t.expect_addition(["dist/a1.txt", "dist/a2.txt"])
|
||||
|
||||
# Regression test: check that <location>. works.
|
||||
|
||||
@@ -84,7 +84,7 @@ r"""Unable to load Boost.Build
|
||||
However, it failed to call the "boost-build" rule""")
|
||||
|
||||
# Test bootstrapping based on BOOST_BUILD_PATH.
|
||||
t.run_build_system("-sBOOST_BUILD_PATH=../boost-root/build",
|
||||
t.run_build_system(["-sBOOST_BUILD_PATH=../boost-root/build"],
|
||||
subdir="bootstrap-env", stdout="build system bootstrapped")
|
||||
|
||||
# Test bootstrapping based on an explicit path in boost-build.jam.
|
||||
|
||||
@@ -24,13 +24,13 @@ t.expect_addition("lib/bin/$toolset/debug/" * BoostBuild.List("c.obj "
|
||||
t.expect_nothing_more()
|
||||
|
||||
reset()
|
||||
t.run_build_system("link=shared", subdir="lib")
|
||||
t.run_build_system(["link=shared"], subdir="lib")
|
||||
t.expect_addition("lib/bin/$toolset/debug/" * BoostBuild.List("c.obj "
|
||||
"auxilliary1.lib auxilliary2.dll"))
|
||||
t.expect_nothing_more()
|
||||
|
||||
reset()
|
||||
t.run_build_system("link=static", subdir="lib")
|
||||
t.run_build_system(["link=static"], subdir="lib")
|
||||
t.expect_addition("lib/bin/$toolset/debug/link-static/" * BoostBuild.List(
|
||||
"c.obj auxilliary1.lib auxilliary2.lib"))
|
||||
t.expect_nothing_more()
|
||||
|
||||
@@ -98,12 +98,12 @@ __declspec (dllexport) void x () {}
|
||||
BoostBuild.List("bin/$toolset/release/link-static/b_rt.lib") +
|
||||
BoostBuild.List("c/a_rt.exe"))
|
||||
|
||||
variants = "debug release link=static,shared"
|
||||
variants = ["debug", "release", "link=static,shared"]
|
||||
|
||||
t.run_build_system(variants)
|
||||
t.expect_addition(file_list)
|
||||
|
||||
t.run_build_system(variants + " clean")
|
||||
t.run_build_system(variants + ["clean"])
|
||||
t.expect_removal(file_list)
|
||||
|
||||
|
||||
|
||||
@@ -31,9 +31,10 @@ def included_resource_newer_than_rc_script():
|
||||
# Disable reading any external Boost Build configuration. This test is
|
||||
# self sufficient so these options protect it from being adversly
|
||||
# affected by any local (mis)configuration..
|
||||
t = BoostBuild.Tester("-d4 --debug-configuration --ignore-site-config "
|
||||
"--user-config= toolset=%s" % toolsetName, pass_d0=False,
|
||||
pass_toolset=False, use_test_config=False, translate_suffixes=False)
|
||||
t = BoostBuild.Tester(["-d4", "--debug-configuration",
|
||||
"--ignore-site-config", "--user-config=", "toolset=%s" % toolsetName],
|
||||
pass_d0=False, pass_toolset=False, use_test_config=False,
|
||||
translate_suffixes=False)
|
||||
|
||||
# Prepare a dummy toolset so we do not get errors in case the default one
|
||||
# is not found and that we can test rc.jam functionality without having to
|
||||
@@ -84,7 +85,7 @@ obj xxx : xxx.rc ;
|
||||
if noexec:
|
||||
params.append("-n")
|
||||
params.append("-sNOEXEC=NOEXEC")
|
||||
t.run_build_system(" ".join(params))
|
||||
t.run_build_system(params)
|
||||
t.expect_output_line("*NOEXEC*", noexec)
|
||||
obj_file = "xxx_res.obj"
|
||||
t.expect_output_line("compile.resource.dummy *%s" % obj_file, expect)
|
||||
|
||||
@@ -16,7 +16,7 @@ import BoostBuild
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
t = BoostBuild.Tester("--dump-tests")
|
||||
t = BoostBuild.Tester(["--dump-tests"])
|
||||
|
||||
t.write("TestBuild/jamroot.jam", """\
|
||||
import testing ;
|
||||
|
||||
@@ -83,8 +83,8 @@ bar +user: [0-9\.]+ +system: +[0-9\.]+ *
|
||||
\.\.\.updated 2 targets\.\.\.$
|
||||
"""
|
||||
|
||||
t.run_build_system("-ffile.jam -d+1", stdout=expected_output, match=lambda
|
||||
actual, expected: re.search(expected, actual, re.DOTALL))
|
||||
t.run_build_system(["-ffile.jam", "-d+1"], stdout=expected_output,
|
||||
match=lambda actual, expected: re.search(expected, actual, re.DOTALL))
|
||||
t.expect_addition("foo")
|
||||
t.expect_addition("bar")
|
||||
t.expect_nothing_more()
|
||||
|
||||
@@ -30,7 +30,7 @@ __declspec(dllexport)
|
||||
helper() {}
|
||||
""")
|
||||
|
||||
t.run_build_system("link=static")
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("bin/$toolset/debug/link-static/test.passed")
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
import BoostBuild
|
||||
|
||||
t = BoostBuild.Tester(pass_toolset=0)
|
||||
t.run_build_system("--debug --build-system=test/test")
|
||||
t.run_build_system(["--debug", "--build-system=test/test"])
|
||||
t.cleanup()
|
||||
|
||||
@@ -19,11 +19,11 @@ t.run_build_system()
|
||||
# easy to check if a warning was issued or not.
|
||||
t.run_build_system(stdout="")
|
||||
|
||||
t.run_build_system("-sGENERATE_ONLY_UNUSABLE=1", stdout="")
|
||||
t.run_build_system(["-sGENERATE_ONLY_UNUSABLE=1"], stdout="")
|
||||
|
||||
# Now check that even if main target generates nothing, its usage requirements
|
||||
# are still propagated to dependants.
|
||||
t.write("a.cpp", "int main() {}\n")
|
||||
t.run_build_system("-sGENERATE_NOTHING=1")
|
||||
t.run_build_system(["-sGENERATE_NOTHING=1"])
|
||||
|
||||
t.cleanup()
|
||||
|
||||
@@ -51,7 +51,7 @@ int main() { foo(); }
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.run_build_system("--clean")
|
||||
t.run_build_system(["--clean"])
|
||||
|
||||
|
||||
# Test that use requirements on main target work, when they are referred using
|
||||
@@ -78,7 +78,7 @@ int main() {}
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.run_build_system("--clean")
|
||||
t.run_build_system(["--clean"])
|
||||
|
||||
|
||||
# Test that usage requirements on a project work.
|
||||
@@ -132,7 +132,7 @@ foo() {}
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.run_build_system("--clean")
|
||||
t.run_build_system(["--clean"])
|
||||
|
||||
|
||||
# Test that we correctly handle dependency features in usage requirements on
|
||||
@@ -170,7 +170,7 @@ must_export_something;
|
||||
""")
|
||||
|
||||
t.run_build_system()
|
||||
t.run_build_system("--clean")
|
||||
t.run_build_system(["--clean"])
|
||||
|
||||
|
||||
# Test correct handling of dependency features in project requirements.
|
||||
@@ -249,7 +249,7 @@ __declspec(dllexport)
|
||||
foo() {}
|
||||
""")
|
||||
|
||||
t.run_build_system("link=static")
|
||||
t.run_build_system(["link=static"])
|
||||
t.expect_addition("libs/bin/$toolset/debug/link-static/a_d.obj")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user