Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions easybuild/easyblocks/p/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,19 @@ def build_step(self, *args, **kwargs):

super(EB_Python, self).build_step(*args, **kwargs)

def test_step(self):
"""Test Python build via 'make test'."""
# Turn on testing by default for recent Python versions
relevant_python = (self.name.lower() == 'python' and LooseVersion(self.version) >= LooseVersion('3.10'))
if relevant_python and self.cfg['runtest'] is None:
self.cfg['runtest'] = 'test'
# Need to skip some troublesome tests
# (socket tests give a permission denied error, may be due to SELinux)
# (curses error is from test_background, just ignoring)
if self.cfg['testopts'] is None:
self.cfg['testopts'] = 'TESTOPTS="-x test_socket test_curses "'
super(EB_Python, self).test_step()

def install_step(self):
"""Extend make install to make sure that the 'python' command is present."""

Expand Down