diff --git a/src/tools/python.jam b/src/tools/python.jam index 71feff689..c9f6f4c25 100644 --- a/src/tools/python.jam +++ b/src/tools/python.jam @@ -1272,7 +1272,7 @@ rule capture-output ( target : sources * : properties * ) } local path-separator = [ os.path-separator [ translate-os $(target-os) ] ] ; local set-PYTHONPATH = [ common.variable-setting-command PYTHONPATH : - $(PYTHONPATH:J=$(path-separator)) ] ; + $(PYTHONPATH:E=:J=$(path-separator)) ] ; LAUNCHER on $(target) = $(set-PYTHONPATH) [ on $(target) return \"$(PYTHON)\" ] ; } diff --git a/test/BoostBuild.py b/test/BoostBuild.py index e7ed1c3ed..e15fe6798 100644 --- a/test/BoostBuild.py +++ b/test/BoostBuild.py @@ -219,7 +219,7 @@ class Tester(TestCmd.TestCmd): **keywords): assert arguments.__class__ is not str - self.original_workdir = os.getcwd() + self.original_workdir = os.path.dirname(__file__) if workdir and not os.path.isabs(workdir): raise ("Parameter workdir <%s> must point to an absolute " "directory: " % workdir) @@ -280,8 +280,9 @@ class Tester(TestCmd.TestCmd): # Find where jam_src is located. Try for the debug version if it is # lying around. - dirs = [os.path.join("..", "src", "engine", jam_build_dir + ".debug"), - os.path.join("..", "src", "engine", jam_build_dir)] + srcdir = os.path.join(os.path.dirname(__file__), "..", "src") + dirs = [os.path.join(srcdir, "engine", jam_build_dir + ".debug"), + os.path.join(srcdir, "engine", jam_build_dir)] for d in dirs: if os.path.exists(d): jam_build_dir = d diff --git a/test/Jamfile.jam b/test/Jamfile.jam new file mode 100644 index 000000000..7ec0bf303 --- /dev/null +++ b/test/Jamfile.jam @@ -0,0 +1,29 @@ +# Copyright 2018 Steven Watanabe +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import python ; +import testing ; + +if ! [ python.configured ] +{ + using python ; +} + +# Not quite perfect, but good enough for most purposes +local test-files = [ glob *.py ] ; + +local boost-build-files = [ glob + ../src/tools/*.jam + ../src/tools/*/*.jam + ../src/build/*.jam + ../src/util/*.jam + ../src/kernel/*.jam + ../src/options/*.jam + ../src/*.jam ] ; + +testing.make-test run-pyd : test_all.py : + $(test-files) + $(boost-build-files) + ;