summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-11-22 10:14:28 (GMT)
committerGitHub <noreply@github.com>2021-11-22 10:14:28 (GMT)
commit9e7a2e492052956d511d753a276a4bdf6eb47072 (patch)
treedbc9ade367b8af8fdbad2c0acd1b30a460b659d4
parent07cf66fd03e161c09279346da4e76705cf42d535 (diff)
downloadcpython-9e7a2e492052956d511d753a276a4bdf6eb47072.zip
cpython-9e7a2e492052956d511d753a276a4bdf6eb47072.tar.gz
cpython-9e7a2e492052956d511d753a276a4bdf6eb47072.tar.bz2
Fix out-of-tree build support for multissltest (GH-29694)
(cherry picked from commit 512dbf6f56364d359e16988b3fd7e766edfaebf9) Co-authored-by: Christian Heimes <christian@python.org>
-rw-r--r--Makefile.pre.in4
-rwxr-xr-xTools/ssl/multissltests.py14
2 files changed, 12 insertions, 6 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 673e6ef..ae6555c 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1259,10 +1259,10 @@ quicktest: @DEF_MAKE_RULE@ platform
# SSL tests
.PHONY: multisslcompile multissltest
multisslcompile: build_all
- $(RUNSHARED) ./$(BUILDPYTHON) Tools/ssl/multissltests.py --steps=modules
+ $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/ssl/multissltests.py --steps=modules
multissltest: build_all
- $(RUNSHARED) ./$(BUILDPYTHON) Tools/ssl/multissltests.py
+ $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/ssl/multissltests.py
install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall @FRAMEWORKINSTALLLAST@
if test "x$(ENSUREPIP)" != "xno" ; then \
diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py
index 7bdfd0b..ba2663e 100755
--- a/Tools/ssl/multissltests.py
+++ b/Tools/ssl/multissltests.py
@@ -153,8 +153,10 @@ class AbstractBuilder(object):
install_target = 'install'
jobs = os.cpu_count()
- module_files = ("Modules/_ssl.c",
- "Modules/_hashopenssl.c")
+ module_files = (
+ os.path.join(PYTHONROOT, "Modules/_ssl.c"),
+ os.path.join(PYTHONROOT, "Modules/_hashopenssl.c"),
+ )
module_libs = ("_ssl", "_hashlib")
def __init__(self, version, args):
@@ -357,7 +359,7 @@ class AbstractBuilder(object):
env["LD_RUN_PATH"] = self.lib_dir
log.info("Rebuilding Python modules")
- cmd = [sys.executable, "setup.py", "build"]
+ cmd = [sys.executable, os.path.join(PYTHONROOT, "setup.py"), "build"]
self._subprocess_call(cmd, env=env)
self.check_imports()
@@ -372,7 +374,11 @@ class AbstractBuilder(object):
def run_python_tests(self, tests, network=True):
if not tests:
- cmd = [sys.executable, 'Lib/test/ssltests.py', '-j0']
+ cmd = [
+ sys.executable,
+ os.path.join(PYTHONROOT, 'Lib/test/ssltests.py'),
+ '-j0'
+ ]
elif sys.version_info < (3, 3):
cmd = [sys.executable, '-m', 'test.regrtest']
else: