Skip to content

Commit

Permalink
Add test step by default for recent Python installations
Browse files Browse the repository at this point in the history
  • Loading branch information
ocaisa committed Jun 7, 2024
1 parent 32b7445 commit f8c2321
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions easybuild/easyblocks/p/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,15 @@ 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
if LooseVersion(self.version) >= LooseVersion('3.10') and self.cfg['runtest'] is None:
self.cfg['runtest'] = 'test'
# Need to skip some troublesome tests
self.cfg['testopts'] = 'TESTOPTS="-x test_socket "'
super(EB_Python, self).test_step()

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

Expand Down

0 comments on commit f8c2321

Please sign in to comment.