diff options
author | Mathieu Duponchelle <mathieu@centricular.com> | 2018-04-21 19:07:28 +0200 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-05-03 18:50:40 +0530 |
commit | 8bda86faabc5943954d85720967caadc1de95c46 (patch) | |
tree | f566820b734abe749b9212f97787d83fdbddadfd /run_unittests.py | |
parent | 6c115f1626f9f1f945b3de75ca38f5bc2ac4aad3 (diff) | |
download | meson-8bda86faabc5943954d85720967caadc1de95c46.zip meson-8bda86faabc5943954d85720967caadc1de95c46.tar.gz meson-8bda86faabc5943954d85720967caadc1de95c46.tar.bz2 |
python module: make it work with pypy
pypy installations don't usuallyy ship with pkg-config files,
we thus need to replicate what their version of distutils does.
In addition, we also try our best to build against other
pythons that do not have pkg-config files.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 834aadb..4c51bb4 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -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): |