aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-05-03 21:05:22 +0300
committerGitHub <noreply@github.com>2018-05-03 21:05:22 +0300
commit211127c834e5399eba11ad7977c85e67e258cf9c (patch)
treec38440e34dc1adc1ca369e4e74708fa704c5724d /run_unittests.py
parent6c115f1626f9f1f945b3de75ca38f5bc2ac4aad3 (diff)
parent575ffec62e9b24513db48cd5af3a1100fc79143f (diff)
downloadmeson-211127c834e5399eba11ad7977c85e67e258cf9c.zip
meson-211127c834e5399eba11ad7977c85e67e258cf9c.tar.gz
meson-211127c834e5399eba11ad7977c85e67e258cf9c.tar.bz2
Merge pull request #3445 from MathieuDuponchelle/pypy_support
python module: make it work with pypy
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 834aadb..78bb9b7 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3160,7 +3160,7 @@ class PythonTests(BasePlatformTests):
if self.backend is not Backend.ninja:
raise unittest.SkipTest('Skipping python tests with {} backend'.format(self.backend.name))
- testdir = os.path.join(self.src_root, 'test cases', 'python', '1 extmodule')
+ testdir = os.path.join(self.src_root, 'test cases', 'unit', '32 python extmodule')
# No python version specified, this will use meson's python
self.init(testdir)
@@ -3186,6 +3186,19 @@ class PythonTests(BasePlatformTests):
self.wipe()
+ for py in ('pypy', 'pypy3'):
+ try:
+ self.init(testdir, ['-Dpython=%s' % py])
+ except unittest.SkipTest:
+ # Same as above, pypy2 and pypy3 are not expected to be present
+ # on the test system, the test project only raises in these cases
+ continue
+
+ # We have a pypy, this is expected to work
+ self.build()
+ self.run_tests()
+ self.wipe()
+
# The test is configured to error out with MESON_SKIP_TEST
# in case it could not find python
with self.assertRaises(unittest.SkipTest):