diff --git a/test/BoostBuild.py b/test/BoostBuild.py
index 0e1c93fcb..d955a3986 100644
--- a/test/BoostBuild.py
+++ b/test/BoostBuild.py
@@ -11,10 +11,22 @@ import time
import tempfile
import sys
+def get_toolset():
+ if (len(sys.argv) > 1):
+ return sys.argv[1]
+ else:
+ return "gcc"
+
+
# Prepare the map of suffixes
-suffixes = {'.exe': '', '.dll': '.so', '.lib': '.a'}
+suffixes = {'.exe': '', '.dll': '.so', '.lib': '.a', '.obj': '.o'}
if os.environ.get('OS','').lower().startswith('windows'):
- suffixes = {'.lib': '.a'} # static libs have '.a' suffix with mingw...
+ suffixes = {}
+ if get_toolset() in ["gcc"]:
+ suffixes['.lib'] = '.a' # static libs have '.a' suffix with mingw...
+ suffixes['.obj'] = '.o'
+
+
#
# FIXME: this is copy-pasted from TestSCons.py
@@ -47,13 +59,18 @@ class Tester(TestCmd.TestCmd):
"""
def __init__(self, arguments="", executable = 'bjam', match =
TestCmd.match_exact, boost_build_path = None,
- translate_suffixes = 1,
+ translate_suffixes = 1, pass_toolset = 1,
**keywords):
self.original_workdir = os.getcwd()
self.last_build_time = 0
self.translate_suffixes = translate_suffixes
+ self.toolset = get_toolset()
+
+ if pass_toolset:
+ arguments = self.toolset + " " + arguments
+
jam_build_dir = ""
if os.name == 'nt':
jam_build_dir = "bin.ntx86"
@@ -353,11 +370,14 @@ class Tester(TestCmd.TestCmd):
self.fail_test(1)
def expect_content(self, name, content, exact=0):
+ name = self.adjust_names(name)[0]
if exact:
actual = self.read(name)
else:
actual = string.replace(self.read_and_strip(name), "\\", "/")
+ content = string.replace(content, "$toolset", self.toolset)
+
if actual != content:
print "Expected:\n"
print content
@@ -428,10 +448,12 @@ class Tester(TestCmd.TestCmd):
def adjust_names(self, names):
if type(names) == types.StringType:
names = [names]
- return map(self.adjust_suffix, names)
+ r = map(self.adjust_suffix, names)
+ r = map(lambda x: string.replace(x, "$toolset", self.toolset), r)
+ return r
def native_file_name(self, name):
- name = self.adjust_suffix(name)
+ name = self.adjust_names(name)[0]
elements = string.split(name, "/")
return os.path.normpath(apply(os.path.join, [self.workdir]+elements))
diff --git a/test/build_dir.py b/test/build_dir.py
index 1f6d04534..fb594e6bc 100644
--- a/test/build_dir.py
+++ b/test/build_dir.py
@@ -24,8 +24,8 @@ t.write("src/b.cpp", "int main() {}\n")
t.run_build_system()
-t.expect_addition(["build/bin/gcc/debug/a.exe",
- "build/src/bin/gcc/debug/b.exe"])
+t.expect_addition(["build/bin/$toolset/debug/a.exe",
+ "build/src/bin/$toolset/debug/b.exe"])
# Test that building from child projects work
t.run_build_system(subdir='src')
@@ -45,7 +45,7 @@ exe b : b.cpp ;
""")
t.run_build_system()
-t.expect_addition(["bin/gcc/debug/a.exe",
- "src/build/bin/gcc/debug/b.exe"])
+t.expect_addition(["bin/$toolset/debug/a.exe",
+ "src/build/bin/$toolset/debug/b.exe"])
t.cleanup()
diff --git a/test/chain.py b/test/chain.py
index c67483982..c731d48ed 100644
--- a/test/chain.py
+++ b/test/chain.py
@@ -48,6 +48,6 @@ make b.cpp : : create ;
t.write("a.cpp", "")
t.run_build_system()
-t.expect_addition("bin/gcc/debug/a.exe")
+t.expect_addition("bin/$toolset/debug/a.exe")
t.cleanup()
diff --git a/test/conditionals.py b/test/conditionals.py
index 098ffb382..61349d992 100644
--- a/test/conditionals.py
+++ b/test/conditionals.py
@@ -16,13 +16,13 @@ int main() {}
""")
t.write("Jamfile", "exe a : a.cpp : static:STATIC ;")
t.run_build_system("link=static")
-t.expect_addition("bin/gcc/debug/link-static/main-target-a/a.exe")
+t.expect_addition("bin/$toolset/debug/link-static/main-target-a/a.exe")
t.write("Jamfile", """
project : requirements static:STATIC ;
exe a : a.cpp ;
""")
t.run_build_system("link=static")
-t.expect_addition("bin/gcc/debug/link-static/a.exe")
+t.expect_addition("bin/$toolset/debug/link-static/a.exe")
t.cleanup()
diff --git a/test/default_build.py b/test/default_build.py
index f931eb1da..760b29e58 100644
--- a/test/default_build.py
+++ b/test/default_build.py
@@ -3,15 +3,15 @@
# Test that default build clause actually has any effect.
from BoostBuild import Tester
-t = Tester()
+t = Tester(pass_toolset=0)
t.write("project-root.jam", "import gcc ;")
t.write("Jamfile", "exe a : a.cpp : : debug release ;")
t.write("a.cpp", "int main() {}\n")
t.run_build_system()
-t.expect_addition("bin/gcc/debug/a.exe")
-t.expect_addition("bin/gcc/release/a.exe")
+t.expect_addition("bin/$toolset/debug/a.exe")
+t.expect_addition("bin/$toolset/release/a.exe")
# Now try a harder example: default build which contains
# should cause to be present when "b" is compiled.
diff --git a/test/dependency_test.py b/test/dependency_test.py
index ec37a0d4b..79d756d3a 100644
--- a/test/dependency_test.py
+++ b/test/dependency_test.py
@@ -8,9 +8,9 @@ t.set_tree("dependency-test")
t.run_build_system()
# Check that main target 'c' was able to find 'x.h' from
# 'a's dependency graph
-t.expect_addition("bin/gcc/debug/main-target-c/c.exe")
+t.expect_addition("bin/$toolset/debug/main-target-c/c.exe")
# Check that main target 'e' was able to find 'y.h'
-t.expect_addition("bin/gcc/debug/main-target-e/e.exe")
+t.expect_addition("bin/$toolset/debug/main-target-e/e.exe")
# Check handling of first level includes.
@@ -18,35 +18,35 @@ t.expect_addition("bin/gcc/debug/main-target-e/e.exe")
t.touch("a.h")
t.run_build_system()
-t.expect_touch("bin/gcc/debug/a.exe")
-t.expect_touch("bin/gcc/debug/a.o")
-t.expect_touch("bin/gcc/debug/b.exe")
-t.expect_touch("bin/gcc/debug/b.o")
-t.expect_touch("bin/gcc/debug/main-target-c/c.exe")
+t.expect_touch("bin/$toolset/debug/a.exe")
+t.expect_touch("bin/$toolset/debug/a.o")
+t.expect_touch("bin/$toolset/debug/b.exe")
+t.expect_touch("bin/$toolset/debug/b.o")
+t.expect_touch("bin/$toolset/debug/main-target-c/c.exe")
t.expect_nothing_more()
# Only 'a' include and should be updated
t.touch("src1/a.h")
t.run_build_system()
-t.expect_touch("bin/gcc/debug/a.exe")
-t.expect_touch("bin/gcc/debug/a.o")
-t.expect_touch("bin/gcc/debug/main-target-c/c.exe")
+t.expect_touch("bin/$toolset/debug/a.exe")
+t.expect_touch("bin/$toolset/debug/a.o")
+t.expect_touch("bin/$toolset/debug/main-target-c/c.exe")
t.expect_nothing_more()
# "src/a.h" includes "b.h" (in the same dir)
t.touch("src1/b.h")
t.run_build_system()
-t.expect_touch("bin/gcc/debug/a.exe")
-t.expect_touch("bin/gcc/debug/a.o")
-t.expect_touch("bin/gcc/debug/main-target-c/c.exe")
+t.expect_touch("bin/$toolset/debug/a.exe")
+t.expect_touch("bin/$toolset/debug/a.o")
+t.expect_touch("bin/$toolset/debug/main-target-c/c.exe")
t.expect_nothing_more()
# included by "src/b.h". We had a bug: file included via "",
# like "b.h" is in this case was not scanned at all.
t.touch("src1/c.h")
t.run_build_system()
-t.expect_touch("bin/gcc/debug/a.exe")
+t.expect_touch("bin/$toolset/debug/a.exe")
t.touch("b.h")
t.run_build_system()
@@ -58,6 +58,6 @@ t.expect_nothing_more()
# support, this check will be implemented later.
t.touch("x.foo")
t.run_build_system()
-t.expect_touch("bin/gcc/debug/a.o")
+t.expect_touch("bin/$toolset/debug/a.o")
t.cleanup()
diff --git a/test/direct_request_test.py b/test/direct_request_test.py
index 4f59d03ae..69fbfd2e1 100644
--- a/test/direct_request_test.py
+++ b/test/direct_request_test.py
@@ -10,7 +10,7 @@ t = Tester()
t.set_tree("direct-request-test")
t.run_build_system(extra_args="define=MACROS")
-t.expect_addition("bin/gcc/debug/"
+t.expect_addition("bin/$toolset/debug/"
* (List("a.o b.o b.dll a.exe")))
diff --git a/test/generators-test/lex.jam b/test/generators-test/lex.jam
new file mode 100644
index 000000000..81ae22fd3
--- /dev/null
+++ b/test/generators-test/lex.jam
@@ -0,0 +1,18 @@
+# Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and
+# distribute this software is granted provided this copyright notice appears in
+# all copies. This software is provided "as is" without express or implied
+# warranty, and with no claim as to its suitability for any purpose.
+
+import type ;
+import generators ;
+import feature ;
+import property ;
+
+type.register LEX : l ;
+
+generators.register-standard lex.lex : LEX : C ;
+
+actions lex
+{
+ touch $(<)
+}
\ No newline at end of file
diff --git a/test/generators-test/project-root.jam b/test/generators-test/project-root.jam
index 938106dc4..d914ecb2a 100644
--- a/test/generators-test/project-root.jam
+++ b/test/generators-test/project-root.jam
@@ -2,6 +2,7 @@
import class : class new ;
import gcc ;
+import borland ;
import lex ;
import qt ;
import extra ;
diff --git a/test/generators_test.py b/test/generators_test.py
index 5b78a6c4b..1fe186fb9 100644
--- a/test/generators_test.py
+++ b/test/generators_test.py
@@ -9,26 +9,26 @@ t.set_tree("generators-test")
t.run_build_system()
t.expect_addition(
- "bin/gcc/debug/"
+ "bin/$toolset/debug/"
* (
List(
- "a.o b.o c.h c.cpp c.o d_parser.whl d_lexer.dlp d_parser.cpp d_lexer.cpp "
- + "d_parser.lr0 x.c x.o y.x1 y.x2 "
- + "y.cpp y.o e.marked.cpp e.positions e.target.cpp e.o "
+ "a.obj b.obj c.h c.cpp c.obj d_parser.whl d_lexer.dlp d_parser.cpp d_lexer.cpp "
+ + "d_parser.lr0 x.c x.obj y.x1 y.x2 "
+ + "y.cpp y.obj e.marked.cpp e.positions e.target.cpp e.obj "
+ "a.exe e.exe"))
)
-t.expect_addition(["lib/bin/gcc/debug/c.o",
- "lib/bin/gcc/debug/auxilliary.lib",
+t.expect_addition(["lib/bin/$toolset/debug/c.obj",
+ "lib/bin/$toolset/debug/auxilliary.lib",
])
t.run_build_system(subdir='lib')
-t.expect_addition(["lib/bin/gcc/debug/auxilliary2.dll"])
+t.expect_addition(["lib/bin/$toolset/debug/auxilliary2.dll"])
t.run_build_system(subdir='lib', extra_args="link=static")
-t.expect_addition(["lib/bin/gcc/debug/link-static/auxilliary2.lib"])
+t.expect_addition(["lib/bin/$toolset/debug/link-static/auxilliary2.lib"])
t.cleanup()
diff --git a/test/main_properties.py b/test/main_properties.py
index dd1f1dc13..cbf8e5400 100644
--- a/test/main_properties.py
+++ b/test/main_properties.py
@@ -20,7 +20,7 @@ int main() { foo(); }
t.write("b.cpp", "void foo() {}\n")
t.run_build_system()
-t.expect_addition("bin/gcc/debug/main-target-b/b.o")
+t.expect_addition("bin/$toolset/debug/main-target-b/b.o")
# This tests another bug: when source file was used by two main targets,
# one without any requirements and another with free requirements, it
@@ -36,7 +36,7 @@ int main() {}
t.rm("bin")
t.run_build_system()
-t.expect_addition(["bin/gcc/debug/a.o", "bin/gcc/debug/main-target-b/a.o"])
+t.expect_addition(["bin/$toolset/debug/a.o", "bin/$toolset/debug/main-target-b/a.o"])
t.cleanup()
diff --git a/test/make_rule.py b/test/make_rule.py
index 63db44270..6eec3f769 100644
--- a/test/make_rule.py
+++ b/test/make_rule.py
@@ -5,7 +5,7 @@
from BoostBuild import Tester
from string import find
-t = Tester()
+t = Tester(pass_toolset=0)
t.write("project-root.jam", "")
t.write("Jamfile", """
diff --git a/test/module_actions.py b/test/module_actions.py
index 027e92cff..93e6d1ccd 100644
--- a/test/module_actions.py
+++ b/test/module_actions.py
@@ -7,7 +7,7 @@ import re
spaces_re = re.compile("\ \ +")
trailing_spaces_re = re.compile("\ +\n")
-t = Tester()
+t = Tester(pass_toolset=0)
t.set_tree('module-actions')
diff --git a/test/prebuilt.py b/test/prebuilt.py
index a6667ee1f..df1796daa 100644
--- a/test/prebuilt.py
+++ b/test/prebuilt.py
@@ -20,7 +20,7 @@ t.copy("ext/Jamfile2", "ext/Jamfile")
# libraries are used.
t.run_build_system("debug release")
-t.expect_addition("bin/gcc/debug/main-target-hello/hello.exe")
-t.expect_addition("bin/gcc/release/main-target-hello/hello.exe")
+t.expect_addition("bin/$toolset/debug/main-target-hello/hello.exe")
+t.expect_addition("bin/$toolset/release/main-target-hello/hello.exe")
t.cleanup()
diff --git a/test/project_dependencies.py b/test/project_dependencies.py
index b5d0e005f..88cd413e3 100644
--- a/test/project_dependencies.py
+++ b/test/project_dependencies.py
@@ -30,7 +30,7 @@ t.copy("src/a.cpp", "src/b.cpp")
t.run_build_system()
# Test that there's no "main-target-a" part.
-t.expect_addition("src/bin/gcc/debug/" * List("a.exe b.exe"))
+t.expect_addition("src/bin/$toolset/debug/" * List("a.exe b.exe"))
t.cleanup()
diff --git a/test/project_test1.py b/test/project_test1.py
index d3b647bc7..f28060bca 100644
--- a/test/project_test1.py
+++ b/test/project_test1.py
@@ -3,7 +3,7 @@
from BoostBuild import Tester
import os
-t = Tester("--build-system=project-test1", boost_build_path='')
+t = Tester("--build-system=project-test1", boost_build_path='', pass_toolset=0)
# This test does no modifications, so run in in the invocation dir
diff --git a/test/project_test3.py b/test/project_test3.py
index 9ba71978c..04103fbb9 100644
--- a/test/project_test3.py
+++ b/test/project_test3.py
@@ -18,112 +18,112 @@ Please consult the documentation at 'http://www.boost.org'.
t.set_tree("project-test3")
t.run_build_system()
-t.expect_addition("bin/gcc/debug/a.obj")
-t.expect_content("bin/gcc/debug/a.obj",
+t.expect_addition("bin/$toolset/debug/a.obj")
+t.expect_content("bin/$toolset/debug/a.obj",
"""gcc/debug
a.cpp
""")
-t.expect_addition("bin/gcc/debug/a.exe")
-t.expect_content("bin/gcc/debug/a.exe",
+t.expect_addition("bin/$toolset/debug/a.exe")
+t.expect_content("bin/$toolset/debug/a.exe",
"gcc/debug\n" +
-"bin/gcc/debug/a.obj lib/bin/gcc/debug/b.obj " +
-"lib2/bin/gcc/debug/c.obj lib2/bin/gcc/debug/d.obj " +
-"lib2/helper/bin/gcc/debug/e.obj " +
-"lib3/bin/gcc/debug/f.obj\n"
+"bin/$toolset/debug/a.obj lib/bin/$toolset/debug/b.obj " +
+"lib2/bin/$toolset/debug/c.obj lib2/bin/$toolset/debug/d.obj " +
+"lib2/helper/bin/$toolset/debug/e.obj " +
+"lib3/bin/$toolset/debug/f.obj\n"
)
-t.expect_addition("lib/bin/gcc/debug/b.obj")
-t.expect_content("lib/bin/gcc/debug/b.obj",
+t.expect_addition("lib/bin/$toolset/debug/b.obj")
+t.expect_content("lib/bin/$toolset/debug/b.obj",
"""gcc/debug
lib/b.cpp
""")
-t.expect_addition("lib/bin/gcc/debug/m.exe")
-t.expect_content("lib/bin/gcc/debug/m.exe",
+t.expect_addition("lib/bin/$toolset/debug/m.exe")
+t.expect_content("lib/bin/$toolset/debug/m.exe",
"""gcc/debug
-lib/bin/gcc/debug/b.obj lib2/bin/gcc/debug/c.obj
+lib/bin/$toolset/debug/b.obj lib2/bin/$toolset/debug/c.obj
""")
-t.expect_addition("lib2/bin/gcc/debug/c.obj")
-t.expect_content("lib2/bin/gcc/debug/c.obj",
+t.expect_addition("lib2/bin/$toolset/debug/c.obj")
+t.expect_content("lib2/bin/$toolset/debug/c.obj",
"""gcc/debug
lib2/c.cpp
""")
-t.expect_addition("lib2/bin/gcc/debug/d.obj")
-t.expect_content("lib2/bin/gcc/debug/d.obj",
+t.expect_addition("lib2/bin/$toolset/debug/d.obj")
+t.expect_content("lib2/bin/$toolset/debug/d.obj",
"""gcc/debug
lib2/d.cpp
""")
-t.expect_addition("lib2/bin/gcc/debug/l.exe")
-t.expect_content("lib2/bin/gcc/debug/l.exe",
+t.expect_addition("lib2/bin/$toolset/debug/l.exe")
+t.expect_content("lib2/bin/$toolset/debug/l.exe",
"""gcc/debug
-lib2/bin/gcc/debug/c.obj bin/gcc/debug/a.obj
+lib2/bin/$toolset/debug/c.obj bin/$toolset/debug/a.obj
""")
-t.expect_addition("lib2/helper/bin/gcc/debug/e.obj")
-t.expect_content("lib2/helper/bin/gcc/debug/e.obj",
+t.expect_addition("lib2/helper/bin/$toolset/debug/e.obj")
+t.expect_content("lib2/helper/bin/$toolset/debug/e.obj",
"""gcc/debug
lib2/helper/e.cpp
""")
-t.expect_addition("lib3/bin/gcc/debug/f.obj")
-t.expect_content("lib3/bin/gcc/debug/f.obj",
+t.expect_addition("lib3/bin/$toolset/debug/f.obj")
+t.expect_content("lib3/bin/$toolset/debug/f.obj",
"""gcc/debug
-lib3/f.cpp lib2/helper/bin/gcc/debug/e.obj
+lib3/f.cpp lib2/helper/bin/$toolset/debug/e.obj
""")
t.touch("a.cpp")
t.run_build_system()
-t.expect_touch(["bin/gcc/debug/a.obj",
- "bin/gcc/debug/a.exe",
- "lib2/bin/gcc/debug/l.exe"])
+t.expect_touch(["bin/$toolset/debug/a.obj",
+ "bin/$toolset/debug/a.exe",
+ "lib2/bin/$toolset/debug/l.exe"])
t.run_build_system(extra_args="release optimization=off,speed")
-t.expect_addition([ "bin/gcc/release/a.exe",
- "bin/gcc/release/a.obj",
- "bin/gcc/release/optimization-off/a.exe",
- "bin/gcc/release/optimization-off/a.obj"])
+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(extra_args='clean')
-t.expect_removal(["bin/gcc/debug/a.obj",
- "bin/gcc/debug/a.exe",
- "lib/bin/gcc/debug/b.obj",
- "lib/bin/gcc/debug/m.exe",
- "lib2/bin/gcc/debug/c.obj",
- "lib2/bin/gcc/debug/d.obj",
- "lib2/bin/gcc/debug/l.exe",
- "lib3/bin/gcc/debug/f.obj",
+t.expect_removal(["bin/$toolset/debug/a.obj",
+ "bin/$toolset/debug/a.exe",
+ "lib/bin/$toolset/debug/b.obj",
+ "lib/bin/$toolset/debug/m.exe",
+ "lib2/bin/$toolset/debug/c.obj",
+ "lib2/bin/$toolset/debug/d.obj",
+ "lib2/bin/$toolset/debug/l.exe",
+ "lib3/bin/$toolset/debug/f.obj",
])
# Now test target ids in command line
t.set_tree("project-test3")
t.run_build_system("lib/b.obj")
-t.expect_addition("lib/bin/gcc/debug/b.obj")
+t.expect_addition("lib/bin/$toolset/debug/b.obj")
t.expect_nothing_more()
t.run_build_system("clean lib/b.obj")
-t.expect_removal("lib/bin/gcc/debug/b.obj")
+t.expect_removal("lib/bin/$toolset/debug/b.obj")
t.expect_nothing_more()
t.run_build_system("release lib2@helper/e.obj @/lib3/f.obj")
-t.expect_addition("lib2/helper/bin/gcc/release/e.obj")
-t.expect_addition("lib3/bin/gcc/release/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.expect_addition("lib2/bin/gcc/debug/" * List("c.obj d.obj l.exe"))
-t.expect_addition("bin/gcc/debug/a.obj")
+t.expect_addition("lib2/bin/$toolset/debug/" * 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.expect_addition("lib/bin/gcc/debug/" * List("b.obj m.exe"))
+t.expect_addition("lib/bin/$toolset/debug/" * List("b.obj m.exe"))
t.expect_nothing_more()
t.cleanup()
diff --git a/test/project_test4.py b/test/project_test4.py
index 162d9abb3..d1cbe68a0 100644
--- a/test/project_test4.py
+++ b/test/project_test4.py
@@ -11,28 +11,28 @@ t.set_tree("project-test4")
t.run_build_system()
-t.expect_addition("bin/gcc/debug/a.obj")
-t.expect_content("bin/gcc/debug/a.obj",
+t.expect_addition("bin/$toolset/debug/a.obj")
+t.expect_content("bin/$toolset/debug/a.obj",
"""gcc/debug/include-everything
a.cpp
""")
-t.expect_addition("bin/gcc/debug/a.exe")
-t.expect_content("bin/gcc/debug/a.exe",
+t.expect_addition("bin/$toolset/debug/a.exe")
+t.expect_content("bin/$toolset/debug/a.exe",
"gcc/debug/include-everything\n" +
-"bin/gcc/debug/a.obj lib/bin/gcc/debug/optimization-speed/b.obj\n"
+"bin/$toolset/debug/a.obj lib/bin/$toolset/debug/optimization-speed/b.obj\n"
)
-t.expect_addition("lib/bin/gcc/debug/optimization-speed/b.obj")
-t.expect_content("lib/bin/gcc/debug/optimization-speed/b.obj",
+t.expect_addition("lib/bin/$toolset/debug/optimization-speed/b.obj")
+t.expect_content("lib/bin/$toolset/debug/optimization-speed/b.obj",
"""gcc/debug/include-everything/optimization-speed
lib/b.cpp
""")
-t.expect_addition("bin/gcc/debug/main-target-b.exe/b.exe")
-t.expect_content("bin/gcc/debug/main-target-b.exe/b.exe",
+t.expect_addition("bin/$toolset/debug/main-target-b.exe/b.exe")
+t.expect_content("bin/$toolset/debug/main-target-b.exe/b.exe",
"gcc/debug/define-MACROS/include-everything\n" +
-"bin/gcc/debug/a.obj\n"
+"bin/$toolset/debug/a.obj\n"
)
@@ -71,17 +71,17 @@ t.fail_test(find(t.stdout(), expected) != 0)
#t.run_build_system()
-#t.expect_addition("bin/gcc/debug/a_gcc.obj")
-#t.expect_content("bin/gcc/debug/a_gcc.obj",
+#t.expect_addition("bin/$toolset/debug/a_gcc.obj")
+#t.expect_content("bin/$toolset/debug/a_gcc.obj",
#"""gcc/debug
#a_gcc.cpp
#""")
-#t.expect_content("bin/gcc/debug/a.exe",
+#t.expect_content("bin/$toolset/debug/a.exe",
#"gcc/debug\n" +
-#"bin/gcc/debug/a.obj " +
-#"lib/bin/gcc/debug/optimization-speed/b.obj " +
-#"bin/gcc/debug/a_gcc.obj\n"
+#"bin/$toolset/debug/a.obj " +
+#"lib/bin/$toolset/debug/optimization-speed/b.obj " +
+#"bin/$toolset/debug/a_gcc.obj\n"
#)
# Test that if we specified composite property in target reference,
@@ -92,11 +92,11 @@ t.copy("Jamfile5", "Jamfile")
t.run_build_system()
-t.expect_addition("lib/bin/gcc/release/b.obj")
+t.expect_addition("lib/bin/$toolset/release/b.obj")
-t.expect_content("bin/gcc/debug/a.exe",
+t.expect_content("bin/$toolset/debug/a.exe",
"gcc/debug/include-everything\n" +
-"bin/gcc/debug/a.obj lib/bin/gcc/release/b.obj\n"
+"bin/$toolset/debug/a.obj lib/bin/$toolset/release/b.obj\n"
)
diff --git a/test/searched_lib.py b/test/searched_lib.py
index 465709193..e54aa76b0 100644
--- a/test/searched_lib.py
+++ b/test/searched_lib.py
@@ -13,9 +13,9 @@ t.write("lib/Jamfile", "lib test_lib : test_lib.cpp ;")
t.write("lib/test_lib.cpp", "void foo() {}\n");
t.run_build_system(subdir="lib")
-t.expect_addition("lib/bin/gcc/debug/test_lib.dll")
+t.expect_addition("lib/bin/$toolset/debug/test_lib.dll")
-t.copy("lib/bin/gcc/debug/test_lib.dll", "lib/libtest_lib.dll")
+t.copy("lib/bin/$toolset/debug/test_lib.dll", "lib/libtest_lib.dll")
# A regression test: property referring to
diff --git a/test/startup_v1.py b/test/startup_v1.py
index bb6f111c2..35624aaee 100644
--- a/test/startup_v1.py
+++ b/test/startup_v1.py
@@ -15,6 +15,7 @@ t = Tester(
executable='jam'
, match=match_re
, boost_build_path=''
+ , pass_toolset=0
)
t.set_tree('startup')
diff --git a/test/startup_v2.py b/test/startup_v2.py
index e1acbc93d..c883c40fa 100644
--- a/test/startup_v2.py
+++ b/test/startup_v2.py
@@ -11,6 +11,7 @@ def match_re(actual,expected):
t = Tester(
match= match_re
, boost_build_path=''
+ , pass_toolset=0
)
t.set_tree('startup')
diff --git a/test/test2.py b/test/test2.py
index 42547ee4a..ef04c7545 100644
--- a/test/test2.py
+++ b/test/test2.py
@@ -8,7 +8,7 @@ t = Tester()
t.set_tree("test2")
t.run_build_system("-sBOOST_BUILD_PATH=" + t.original_workdir + "/..")
-file_list = 'bin/foo/gcc/debug/runtime-link-dynamic/' * List("foo foo.o")
+file_list = 'bin/foo/$toolset/debug/runtime-link-dynamic/' * List("foo foo.o")
t.expect_addition(file_list)
diff --git a/test/unit_tests.py b/test/unit_tests.py
index 5066e3762..a5e2af4e1 100644
--- a/test/unit_tests.py
+++ b/test/unit_tests.py
@@ -2,7 +2,7 @@
from BoostBuild import Tester
-t = Tester()
+t = Tester(pass_toolset=0)
t.run_build_system(extra_args="--debug --build-system=test")
-t.cleanup()
\ No newline at end of file
+t.cleanup()
diff --git a/test/use_requirements.py b/test/use_requirements.py
index d5cd84d63..01144b7cd 100644
--- a/test/use_requirements.py
+++ b/test/use_requirements.py
@@ -162,6 +162,6 @@ void foo() {}
""")
t.run_build_system("link=static")
-t.expect_addition("libs/bin/gcc/debug/link-static/a_d.o")
+t.expect_addition("libs/bin/$toolset/debug/link-static/a_d.o")
t.cleanup()
diff --git a/v2/test/BoostBuild.py b/v2/test/BoostBuild.py
index 0e1c93fcb..d955a3986 100644
--- a/v2/test/BoostBuild.py
+++ b/v2/test/BoostBuild.py
@@ -11,10 +11,22 @@ import time
import tempfile
import sys
+def get_toolset():
+ if (len(sys.argv) > 1):
+ return sys.argv[1]
+ else:
+ return "gcc"
+
+
# Prepare the map of suffixes
-suffixes = {'.exe': '', '.dll': '.so', '.lib': '.a'}
+suffixes = {'.exe': '', '.dll': '.so', '.lib': '.a', '.obj': '.o'}
if os.environ.get('OS','').lower().startswith('windows'):
- suffixes = {'.lib': '.a'} # static libs have '.a' suffix with mingw...
+ suffixes = {}
+ if get_toolset() in ["gcc"]:
+ suffixes['.lib'] = '.a' # static libs have '.a' suffix with mingw...
+ suffixes['.obj'] = '.o'
+
+
#
# FIXME: this is copy-pasted from TestSCons.py
@@ -47,13 +59,18 @@ class Tester(TestCmd.TestCmd):
"""
def __init__(self, arguments="", executable = 'bjam', match =
TestCmd.match_exact, boost_build_path = None,
- translate_suffixes = 1,
+ translate_suffixes = 1, pass_toolset = 1,
**keywords):
self.original_workdir = os.getcwd()
self.last_build_time = 0
self.translate_suffixes = translate_suffixes
+ self.toolset = get_toolset()
+
+ if pass_toolset:
+ arguments = self.toolset + " " + arguments
+
jam_build_dir = ""
if os.name == 'nt':
jam_build_dir = "bin.ntx86"
@@ -353,11 +370,14 @@ class Tester(TestCmd.TestCmd):
self.fail_test(1)
def expect_content(self, name, content, exact=0):
+ name = self.adjust_names(name)[0]
if exact:
actual = self.read(name)
else:
actual = string.replace(self.read_and_strip(name), "\\", "/")
+ content = string.replace(content, "$toolset", self.toolset)
+
if actual != content:
print "Expected:\n"
print content
@@ -428,10 +448,12 @@ class Tester(TestCmd.TestCmd):
def adjust_names(self, names):
if type(names) == types.StringType:
names = [names]
- return map(self.adjust_suffix, names)
+ r = map(self.adjust_suffix, names)
+ r = map(lambda x: string.replace(x, "$toolset", self.toolset), r)
+ return r
def native_file_name(self, name):
- name = self.adjust_suffix(name)
+ name = self.adjust_names(name)[0]
elements = string.split(name, "/")
return os.path.normpath(apply(os.path.join, [self.workdir]+elements))
diff --git a/v2/test/build_dir.py b/v2/test/build_dir.py
index 1f6d04534..fb594e6bc 100644
--- a/v2/test/build_dir.py
+++ b/v2/test/build_dir.py
@@ -24,8 +24,8 @@ t.write("src/b.cpp", "int main() {}\n")
t.run_build_system()
-t.expect_addition(["build/bin/gcc/debug/a.exe",
- "build/src/bin/gcc/debug/b.exe"])
+t.expect_addition(["build/bin/$toolset/debug/a.exe",
+ "build/src/bin/$toolset/debug/b.exe"])
# Test that building from child projects work
t.run_build_system(subdir='src')
@@ -45,7 +45,7 @@ exe b : b.cpp ;
""")
t.run_build_system()
-t.expect_addition(["bin/gcc/debug/a.exe",
- "src/build/bin/gcc/debug/b.exe"])
+t.expect_addition(["bin/$toolset/debug/a.exe",
+ "src/build/bin/$toolset/debug/b.exe"])
t.cleanup()
diff --git a/v2/test/chain.py b/v2/test/chain.py
index c67483982..c731d48ed 100644
--- a/v2/test/chain.py
+++ b/v2/test/chain.py
@@ -48,6 +48,6 @@ make b.cpp : : create ;
t.write("a.cpp", "")
t.run_build_system()
-t.expect_addition("bin/gcc/debug/a.exe")
+t.expect_addition("bin/$toolset/debug/a.exe")
t.cleanup()
diff --git a/v2/test/conditionals.py b/v2/test/conditionals.py
index 098ffb382..61349d992 100644
--- a/v2/test/conditionals.py
+++ b/v2/test/conditionals.py
@@ -16,13 +16,13 @@ int main() {}
""")
t.write("Jamfile", "exe a : a.cpp : static:STATIC ;")
t.run_build_system("link=static")
-t.expect_addition("bin/gcc/debug/link-static/main-target-a/a.exe")
+t.expect_addition("bin/$toolset/debug/link-static/main-target-a/a.exe")
t.write("Jamfile", """
project : requirements static:STATIC ;
exe a : a.cpp ;
""")
t.run_build_system("link=static")
-t.expect_addition("bin/gcc/debug/link-static/a.exe")
+t.expect_addition("bin/$toolset/debug/link-static/a.exe")
t.cleanup()
diff --git a/v2/test/default_build.py b/v2/test/default_build.py
index f931eb1da..760b29e58 100644
--- a/v2/test/default_build.py
+++ b/v2/test/default_build.py
@@ -3,15 +3,15 @@
# Test that default build clause actually has any effect.
from BoostBuild import Tester
-t = Tester()
+t = Tester(pass_toolset=0)
t.write("project-root.jam", "import gcc ;")
t.write("Jamfile", "exe a : a.cpp : : debug release ;")
t.write("a.cpp", "int main() {}\n")
t.run_build_system()
-t.expect_addition("bin/gcc/debug/a.exe")
-t.expect_addition("bin/gcc/release/a.exe")
+t.expect_addition("bin/$toolset/debug/a.exe")
+t.expect_addition("bin/$toolset/release/a.exe")
# Now try a harder example: default build which contains
# should cause to be present when "b" is compiled.
diff --git a/v2/test/dependency_test.py b/v2/test/dependency_test.py
index ec37a0d4b..79d756d3a 100644
--- a/v2/test/dependency_test.py
+++ b/v2/test/dependency_test.py
@@ -8,9 +8,9 @@ t.set_tree("dependency-test")
t.run_build_system()
# Check that main target 'c' was able to find 'x.h' from
# 'a's dependency graph
-t.expect_addition("bin/gcc/debug/main-target-c/c.exe")
+t.expect_addition("bin/$toolset/debug/main-target-c/c.exe")
# Check that main target 'e' was able to find 'y.h'
-t.expect_addition("bin/gcc/debug/main-target-e/e.exe")
+t.expect_addition("bin/$toolset/debug/main-target-e/e.exe")
# Check handling of first level includes.
@@ -18,35 +18,35 @@ t.expect_addition("bin/gcc/debug/main-target-e/e.exe")
t.touch("a.h")
t.run_build_system()
-t.expect_touch("bin/gcc/debug/a.exe")
-t.expect_touch("bin/gcc/debug/a.o")
-t.expect_touch("bin/gcc/debug/b.exe")
-t.expect_touch("bin/gcc/debug/b.o")
-t.expect_touch("bin/gcc/debug/main-target-c/c.exe")
+t.expect_touch("bin/$toolset/debug/a.exe")
+t.expect_touch("bin/$toolset/debug/a.o")
+t.expect_touch("bin/$toolset/debug/b.exe")
+t.expect_touch("bin/$toolset/debug/b.o")
+t.expect_touch("bin/$toolset/debug/main-target-c/c.exe")
t.expect_nothing_more()
# Only 'a' include and should be updated
t.touch("src1/a.h")
t.run_build_system()
-t.expect_touch("bin/gcc/debug/a.exe")
-t.expect_touch("bin/gcc/debug/a.o")
-t.expect_touch("bin/gcc/debug/main-target-c/c.exe")
+t.expect_touch("bin/$toolset/debug/a.exe")
+t.expect_touch("bin/$toolset/debug/a.o")
+t.expect_touch("bin/$toolset/debug/main-target-c/c.exe")
t.expect_nothing_more()
# "src/a.h" includes "b.h" (in the same dir)
t.touch("src1/b.h")
t.run_build_system()
-t.expect_touch("bin/gcc/debug/a.exe")
-t.expect_touch("bin/gcc/debug/a.o")
-t.expect_touch("bin/gcc/debug/main-target-c/c.exe")
+t.expect_touch("bin/$toolset/debug/a.exe")
+t.expect_touch("bin/$toolset/debug/a.o")
+t.expect_touch("bin/$toolset/debug/main-target-c/c.exe")
t.expect_nothing_more()
# included by "src/b.h". We had a bug: file included via "",
# like "b.h" is in this case was not scanned at all.
t.touch("src1/c.h")
t.run_build_system()
-t.expect_touch("bin/gcc/debug/a.exe")
+t.expect_touch("bin/$toolset/debug/a.exe")
t.touch("b.h")
t.run_build_system()
@@ -58,6 +58,6 @@ t.expect_nothing_more()
# support, this check will be implemented later.
t.touch("x.foo")
t.run_build_system()
-t.expect_touch("bin/gcc/debug/a.o")
+t.expect_touch("bin/$toolset/debug/a.o")
t.cleanup()
diff --git a/v2/test/direct_request_test.py b/v2/test/direct_request_test.py
index 4f59d03ae..69fbfd2e1 100644
--- a/v2/test/direct_request_test.py
+++ b/v2/test/direct_request_test.py
@@ -10,7 +10,7 @@ t = Tester()
t.set_tree("direct-request-test")
t.run_build_system(extra_args="define=MACROS")
-t.expect_addition("bin/gcc/debug/"
+t.expect_addition("bin/$toolset/debug/"
* (List("a.o b.o b.dll a.exe")))
diff --git a/v2/test/generators-test/lex.jam b/v2/test/generators-test/lex.jam
new file mode 100644
index 000000000..81ae22fd3
--- /dev/null
+++ b/v2/test/generators-test/lex.jam
@@ -0,0 +1,18 @@
+# Copyright (C) Vladimir Prus 2002. Permission to copy, use, modify, sell and
+# distribute this software is granted provided this copyright notice appears in
+# all copies. This software is provided "as is" without express or implied
+# warranty, and with no claim as to its suitability for any purpose.
+
+import type ;
+import generators ;
+import feature ;
+import property ;
+
+type.register LEX : l ;
+
+generators.register-standard lex.lex : LEX : C ;
+
+actions lex
+{
+ touch $(<)
+}
\ No newline at end of file
diff --git a/v2/test/generators-test/project-root.jam b/v2/test/generators-test/project-root.jam
index 938106dc4..d914ecb2a 100644
--- a/v2/test/generators-test/project-root.jam
+++ b/v2/test/generators-test/project-root.jam
@@ -2,6 +2,7 @@
import class : class new ;
import gcc ;
+import borland ;
import lex ;
import qt ;
import extra ;
diff --git a/v2/test/generators_test.py b/v2/test/generators_test.py
index 5b78a6c4b..1fe186fb9 100644
--- a/v2/test/generators_test.py
+++ b/v2/test/generators_test.py
@@ -9,26 +9,26 @@ t.set_tree("generators-test")
t.run_build_system()
t.expect_addition(
- "bin/gcc/debug/"
+ "bin/$toolset/debug/"
* (
List(
- "a.o b.o c.h c.cpp c.o d_parser.whl d_lexer.dlp d_parser.cpp d_lexer.cpp "
- + "d_parser.lr0 x.c x.o y.x1 y.x2 "
- + "y.cpp y.o e.marked.cpp e.positions e.target.cpp e.o "
+ "a.obj b.obj c.h c.cpp c.obj d_parser.whl d_lexer.dlp d_parser.cpp d_lexer.cpp "
+ + "d_parser.lr0 x.c x.obj y.x1 y.x2 "
+ + "y.cpp y.obj e.marked.cpp e.positions e.target.cpp e.obj "
+ "a.exe e.exe"))
)
-t.expect_addition(["lib/bin/gcc/debug/c.o",
- "lib/bin/gcc/debug/auxilliary.lib",
+t.expect_addition(["lib/bin/$toolset/debug/c.obj",
+ "lib/bin/$toolset/debug/auxilliary.lib",
])
t.run_build_system(subdir='lib')
-t.expect_addition(["lib/bin/gcc/debug/auxilliary2.dll"])
+t.expect_addition(["lib/bin/$toolset/debug/auxilliary2.dll"])
t.run_build_system(subdir='lib', extra_args="link=static")
-t.expect_addition(["lib/bin/gcc/debug/link-static/auxilliary2.lib"])
+t.expect_addition(["lib/bin/$toolset/debug/link-static/auxilliary2.lib"])
t.cleanup()
diff --git a/v2/test/main_properties.py b/v2/test/main_properties.py
index dd1f1dc13..cbf8e5400 100644
--- a/v2/test/main_properties.py
+++ b/v2/test/main_properties.py
@@ -20,7 +20,7 @@ int main() { foo(); }
t.write("b.cpp", "void foo() {}\n")
t.run_build_system()
-t.expect_addition("bin/gcc/debug/main-target-b/b.o")
+t.expect_addition("bin/$toolset/debug/main-target-b/b.o")
# This tests another bug: when source file was used by two main targets,
# one without any requirements and another with free requirements, it
@@ -36,7 +36,7 @@ int main() {}
t.rm("bin")
t.run_build_system()
-t.expect_addition(["bin/gcc/debug/a.o", "bin/gcc/debug/main-target-b/a.o"])
+t.expect_addition(["bin/$toolset/debug/a.o", "bin/$toolset/debug/main-target-b/a.o"])
t.cleanup()
diff --git a/v2/test/make_rule.py b/v2/test/make_rule.py
index 63db44270..6eec3f769 100644
--- a/v2/test/make_rule.py
+++ b/v2/test/make_rule.py
@@ -5,7 +5,7 @@
from BoostBuild import Tester
from string import find
-t = Tester()
+t = Tester(pass_toolset=0)
t.write("project-root.jam", "")
t.write("Jamfile", """
diff --git a/v2/test/module_actions.py b/v2/test/module_actions.py
index 027e92cff..93e6d1ccd 100644
--- a/v2/test/module_actions.py
+++ b/v2/test/module_actions.py
@@ -7,7 +7,7 @@ import re
spaces_re = re.compile("\ \ +")
trailing_spaces_re = re.compile("\ +\n")
-t = Tester()
+t = Tester(pass_toolset=0)
t.set_tree('module-actions')
diff --git a/v2/test/prebuilt.py b/v2/test/prebuilt.py
index a6667ee1f..df1796daa 100644
--- a/v2/test/prebuilt.py
+++ b/v2/test/prebuilt.py
@@ -20,7 +20,7 @@ t.copy("ext/Jamfile2", "ext/Jamfile")
# libraries are used.
t.run_build_system("debug release")
-t.expect_addition("bin/gcc/debug/main-target-hello/hello.exe")
-t.expect_addition("bin/gcc/release/main-target-hello/hello.exe")
+t.expect_addition("bin/$toolset/debug/main-target-hello/hello.exe")
+t.expect_addition("bin/$toolset/release/main-target-hello/hello.exe")
t.cleanup()
diff --git a/v2/test/project_dependencies.py b/v2/test/project_dependencies.py
index b5d0e005f..88cd413e3 100644
--- a/v2/test/project_dependencies.py
+++ b/v2/test/project_dependencies.py
@@ -30,7 +30,7 @@ t.copy("src/a.cpp", "src/b.cpp")
t.run_build_system()
# Test that there's no "main-target-a" part.
-t.expect_addition("src/bin/gcc/debug/" * List("a.exe b.exe"))
+t.expect_addition("src/bin/$toolset/debug/" * List("a.exe b.exe"))
t.cleanup()
diff --git a/v2/test/project_test1.py b/v2/test/project_test1.py
index d3b647bc7..f28060bca 100644
--- a/v2/test/project_test1.py
+++ b/v2/test/project_test1.py
@@ -3,7 +3,7 @@
from BoostBuild import Tester
import os
-t = Tester("--build-system=project-test1", boost_build_path='')
+t = Tester("--build-system=project-test1", boost_build_path='', pass_toolset=0)
# This test does no modifications, so run in in the invocation dir
diff --git a/v2/test/project_test3.py b/v2/test/project_test3.py
index 9ba71978c..04103fbb9 100644
--- a/v2/test/project_test3.py
+++ b/v2/test/project_test3.py
@@ -18,112 +18,112 @@ Please consult the documentation at 'http://www.boost.org'.
t.set_tree("project-test3")
t.run_build_system()
-t.expect_addition("bin/gcc/debug/a.obj")
-t.expect_content("bin/gcc/debug/a.obj",
+t.expect_addition("bin/$toolset/debug/a.obj")
+t.expect_content("bin/$toolset/debug/a.obj",
"""gcc/debug
a.cpp
""")
-t.expect_addition("bin/gcc/debug/a.exe")
-t.expect_content("bin/gcc/debug/a.exe",
+t.expect_addition("bin/$toolset/debug/a.exe")
+t.expect_content("bin/$toolset/debug/a.exe",
"gcc/debug\n" +
-"bin/gcc/debug/a.obj lib/bin/gcc/debug/b.obj " +
-"lib2/bin/gcc/debug/c.obj lib2/bin/gcc/debug/d.obj " +
-"lib2/helper/bin/gcc/debug/e.obj " +
-"lib3/bin/gcc/debug/f.obj\n"
+"bin/$toolset/debug/a.obj lib/bin/$toolset/debug/b.obj " +
+"lib2/bin/$toolset/debug/c.obj lib2/bin/$toolset/debug/d.obj " +
+"lib2/helper/bin/$toolset/debug/e.obj " +
+"lib3/bin/$toolset/debug/f.obj\n"
)
-t.expect_addition("lib/bin/gcc/debug/b.obj")
-t.expect_content("lib/bin/gcc/debug/b.obj",
+t.expect_addition("lib/bin/$toolset/debug/b.obj")
+t.expect_content("lib/bin/$toolset/debug/b.obj",
"""gcc/debug
lib/b.cpp
""")
-t.expect_addition("lib/bin/gcc/debug/m.exe")
-t.expect_content("lib/bin/gcc/debug/m.exe",
+t.expect_addition("lib/bin/$toolset/debug/m.exe")
+t.expect_content("lib/bin/$toolset/debug/m.exe",
"""gcc/debug
-lib/bin/gcc/debug/b.obj lib2/bin/gcc/debug/c.obj
+lib/bin/$toolset/debug/b.obj lib2/bin/$toolset/debug/c.obj
""")
-t.expect_addition("lib2/bin/gcc/debug/c.obj")
-t.expect_content("lib2/bin/gcc/debug/c.obj",
+t.expect_addition("lib2/bin/$toolset/debug/c.obj")
+t.expect_content("lib2/bin/$toolset/debug/c.obj",
"""gcc/debug
lib2/c.cpp
""")
-t.expect_addition("lib2/bin/gcc/debug/d.obj")
-t.expect_content("lib2/bin/gcc/debug/d.obj",
+t.expect_addition("lib2/bin/$toolset/debug/d.obj")
+t.expect_content("lib2/bin/$toolset/debug/d.obj",
"""gcc/debug
lib2/d.cpp
""")
-t.expect_addition("lib2/bin/gcc/debug/l.exe")
-t.expect_content("lib2/bin/gcc/debug/l.exe",
+t.expect_addition("lib2/bin/$toolset/debug/l.exe")
+t.expect_content("lib2/bin/$toolset/debug/l.exe",
"""gcc/debug
-lib2/bin/gcc/debug/c.obj bin/gcc/debug/a.obj
+lib2/bin/$toolset/debug/c.obj bin/$toolset/debug/a.obj
""")
-t.expect_addition("lib2/helper/bin/gcc/debug/e.obj")
-t.expect_content("lib2/helper/bin/gcc/debug/e.obj",
+t.expect_addition("lib2/helper/bin/$toolset/debug/e.obj")
+t.expect_content("lib2/helper/bin/$toolset/debug/e.obj",
"""gcc/debug
lib2/helper/e.cpp
""")
-t.expect_addition("lib3/bin/gcc/debug/f.obj")
-t.expect_content("lib3/bin/gcc/debug/f.obj",
+t.expect_addition("lib3/bin/$toolset/debug/f.obj")
+t.expect_content("lib3/bin/$toolset/debug/f.obj",
"""gcc/debug
-lib3/f.cpp lib2/helper/bin/gcc/debug/e.obj
+lib3/f.cpp lib2/helper/bin/$toolset/debug/e.obj
""")
t.touch("a.cpp")
t.run_build_system()
-t.expect_touch(["bin/gcc/debug/a.obj",
- "bin/gcc/debug/a.exe",
- "lib2/bin/gcc/debug/l.exe"])
+t.expect_touch(["bin/$toolset/debug/a.obj",
+ "bin/$toolset/debug/a.exe",
+ "lib2/bin/$toolset/debug/l.exe"])
t.run_build_system(extra_args="release optimization=off,speed")
-t.expect_addition([ "bin/gcc/release/a.exe",
- "bin/gcc/release/a.obj",
- "bin/gcc/release/optimization-off/a.exe",
- "bin/gcc/release/optimization-off/a.obj"])
+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(extra_args='clean')
-t.expect_removal(["bin/gcc/debug/a.obj",
- "bin/gcc/debug/a.exe",
- "lib/bin/gcc/debug/b.obj",
- "lib/bin/gcc/debug/m.exe",
- "lib2/bin/gcc/debug/c.obj",
- "lib2/bin/gcc/debug/d.obj",
- "lib2/bin/gcc/debug/l.exe",
- "lib3/bin/gcc/debug/f.obj",
+t.expect_removal(["bin/$toolset/debug/a.obj",
+ "bin/$toolset/debug/a.exe",
+ "lib/bin/$toolset/debug/b.obj",
+ "lib/bin/$toolset/debug/m.exe",
+ "lib2/bin/$toolset/debug/c.obj",
+ "lib2/bin/$toolset/debug/d.obj",
+ "lib2/bin/$toolset/debug/l.exe",
+ "lib3/bin/$toolset/debug/f.obj",
])
# Now test target ids in command line
t.set_tree("project-test3")
t.run_build_system("lib/b.obj")
-t.expect_addition("lib/bin/gcc/debug/b.obj")
+t.expect_addition("lib/bin/$toolset/debug/b.obj")
t.expect_nothing_more()
t.run_build_system("clean lib/b.obj")
-t.expect_removal("lib/bin/gcc/debug/b.obj")
+t.expect_removal("lib/bin/$toolset/debug/b.obj")
t.expect_nothing_more()
t.run_build_system("release lib2@helper/e.obj @/lib3/f.obj")
-t.expect_addition("lib2/helper/bin/gcc/release/e.obj")
-t.expect_addition("lib3/bin/gcc/release/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.expect_addition("lib2/bin/gcc/debug/" * List("c.obj d.obj l.exe"))
-t.expect_addition("bin/gcc/debug/a.obj")
+t.expect_addition("lib2/bin/$toolset/debug/" * 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.expect_addition("lib/bin/gcc/debug/" * List("b.obj m.exe"))
+t.expect_addition("lib/bin/$toolset/debug/" * List("b.obj m.exe"))
t.expect_nothing_more()
t.cleanup()
diff --git a/v2/test/project_test4.py b/v2/test/project_test4.py
index 162d9abb3..d1cbe68a0 100644
--- a/v2/test/project_test4.py
+++ b/v2/test/project_test4.py
@@ -11,28 +11,28 @@ t.set_tree("project-test4")
t.run_build_system()
-t.expect_addition("bin/gcc/debug/a.obj")
-t.expect_content("bin/gcc/debug/a.obj",
+t.expect_addition("bin/$toolset/debug/a.obj")
+t.expect_content("bin/$toolset/debug/a.obj",
"""gcc/debug/include-everything
a.cpp
""")
-t.expect_addition("bin/gcc/debug/a.exe")
-t.expect_content("bin/gcc/debug/a.exe",
+t.expect_addition("bin/$toolset/debug/a.exe")
+t.expect_content("bin/$toolset/debug/a.exe",
"gcc/debug/include-everything\n" +
-"bin/gcc/debug/a.obj lib/bin/gcc/debug/optimization-speed/b.obj\n"
+"bin/$toolset/debug/a.obj lib/bin/$toolset/debug/optimization-speed/b.obj\n"
)
-t.expect_addition("lib/bin/gcc/debug/optimization-speed/b.obj")
-t.expect_content("lib/bin/gcc/debug/optimization-speed/b.obj",
+t.expect_addition("lib/bin/$toolset/debug/optimization-speed/b.obj")
+t.expect_content("lib/bin/$toolset/debug/optimization-speed/b.obj",
"""gcc/debug/include-everything/optimization-speed
lib/b.cpp
""")
-t.expect_addition("bin/gcc/debug/main-target-b.exe/b.exe")
-t.expect_content("bin/gcc/debug/main-target-b.exe/b.exe",
+t.expect_addition("bin/$toolset/debug/main-target-b.exe/b.exe")
+t.expect_content("bin/$toolset/debug/main-target-b.exe/b.exe",
"gcc/debug/define-MACROS/include-everything\n" +
-"bin/gcc/debug/a.obj\n"
+"bin/$toolset/debug/a.obj\n"
)
@@ -71,17 +71,17 @@ t.fail_test(find(t.stdout(), expected) != 0)
#t.run_build_system()
-#t.expect_addition("bin/gcc/debug/a_gcc.obj")
-#t.expect_content("bin/gcc/debug/a_gcc.obj",
+#t.expect_addition("bin/$toolset/debug/a_gcc.obj")
+#t.expect_content("bin/$toolset/debug/a_gcc.obj",
#"""gcc/debug
#a_gcc.cpp
#""")
-#t.expect_content("bin/gcc/debug/a.exe",
+#t.expect_content("bin/$toolset/debug/a.exe",
#"gcc/debug\n" +
-#"bin/gcc/debug/a.obj " +
-#"lib/bin/gcc/debug/optimization-speed/b.obj " +
-#"bin/gcc/debug/a_gcc.obj\n"
+#"bin/$toolset/debug/a.obj " +
+#"lib/bin/$toolset/debug/optimization-speed/b.obj " +
+#"bin/$toolset/debug/a_gcc.obj\n"
#)
# Test that if we specified composite property in target reference,
@@ -92,11 +92,11 @@ t.copy("Jamfile5", "Jamfile")
t.run_build_system()
-t.expect_addition("lib/bin/gcc/release/b.obj")
+t.expect_addition("lib/bin/$toolset/release/b.obj")
-t.expect_content("bin/gcc/debug/a.exe",
+t.expect_content("bin/$toolset/debug/a.exe",
"gcc/debug/include-everything\n" +
-"bin/gcc/debug/a.obj lib/bin/gcc/release/b.obj\n"
+"bin/$toolset/debug/a.obj lib/bin/$toolset/release/b.obj\n"
)
diff --git a/v2/test/searched_lib.py b/v2/test/searched_lib.py
index 465709193..e54aa76b0 100644
--- a/v2/test/searched_lib.py
+++ b/v2/test/searched_lib.py
@@ -13,9 +13,9 @@ t.write("lib/Jamfile", "lib test_lib : test_lib.cpp ;")
t.write("lib/test_lib.cpp", "void foo() {}\n");
t.run_build_system(subdir="lib")
-t.expect_addition("lib/bin/gcc/debug/test_lib.dll")
+t.expect_addition("lib/bin/$toolset/debug/test_lib.dll")
-t.copy("lib/bin/gcc/debug/test_lib.dll", "lib/libtest_lib.dll")
+t.copy("lib/bin/$toolset/debug/test_lib.dll", "lib/libtest_lib.dll")
# A regression test: property referring to
diff --git a/v2/test/startup_v1.py b/v2/test/startup_v1.py
index bb6f111c2..35624aaee 100644
--- a/v2/test/startup_v1.py
+++ b/v2/test/startup_v1.py
@@ -15,6 +15,7 @@ t = Tester(
executable='jam'
, match=match_re
, boost_build_path=''
+ , pass_toolset=0
)
t.set_tree('startup')
diff --git a/v2/test/startup_v2.py b/v2/test/startup_v2.py
index e1acbc93d..c883c40fa 100644
--- a/v2/test/startup_v2.py
+++ b/v2/test/startup_v2.py
@@ -11,6 +11,7 @@ def match_re(actual,expected):
t = Tester(
match= match_re
, boost_build_path=''
+ , pass_toolset=0
)
t.set_tree('startup')
diff --git a/v2/test/test2.py b/v2/test/test2.py
index 42547ee4a..ef04c7545 100644
--- a/v2/test/test2.py
+++ b/v2/test/test2.py
@@ -8,7 +8,7 @@ t = Tester()
t.set_tree("test2")
t.run_build_system("-sBOOST_BUILD_PATH=" + t.original_workdir + "/..")
-file_list = 'bin/foo/gcc/debug/runtime-link-dynamic/' * List("foo foo.o")
+file_list = 'bin/foo/$toolset/debug/runtime-link-dynamic/' * List("foo foo.o")
t.expect_addition(file_list)
diff --git a/v2/test/unit_tests.py b/v2/test/unit_tests.py
index 5066e3762..a5e2af4e1 100644
--- a/v2/test/unit_tests.py
+++ b/v2/test/unit_tests.py
@@ -2,7 +2,7 @@
from BoostBuild import Tester
-t = Tester()
+t = Tester(pass_toolset=0)
t.run_build_system(extra_args="--debug --build-system=test")
-t.cleanup()
\ No newline at end of file
+t.cleanup()
diff --git a/v2/test/use_requirements.py b/v2/test/use_requirements.py
index d5cd84d63..01144b7cd 100644
--- a/v2/test/use_requirements.py
+++ b/v2/test/use_requirements.py
@@ -162,6 +162,6 @@ void foo() {}
""")
t.run_build_system("link=static")
-t.expect_addition("libs/bin/gcc/debug/link-static/a_d.o")
+t.expect_addition("libs/bin/$toolset/debug/link-static/a_d.o")
t.cleanup()