aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-02-09 00:18:18 -0500
committerEli Schwartz <eschwartz@archlinux.org>2023-02-10 02:16:54 -0500
commit94a190baa2b0f861f0be352dd42b05c4162438fc (patch)
treeec6d7c7d0f3ef15884d0ab9e6caccea322d5bea6 /unittests
parent84dd78e80d7e9db1febf6a0016730e2ab6f7a352 (diff)
downloadmeson-94a190baa2b0f861f0be352dd42b05c4162438fc.zip
meson-94a190baa2b0f861f0be352dd42b05c4162438fc.tar.gz
meson-94a190baa2b0f861f0be352dd42b05c4162438fc.tar.bz2
cython: add unittest to verify that depfiles work
Diffstat (limited to 'unittests')
-rw-r--r--unittests/allplatformstests.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py
index ac60907..5f4af3b 100644
--- a/unittests/allplatformstests.py
+++ b/unittests/allplatformstests.py
@@ -859,6 +859,27 @@ class AllPlatformTests(BasePlatformTests):
name = "/".join(name) # Glue list into a string
self.build(target=name)
+ def test_build_pyx_depfiles(self):
+ # building regularly and then touching a depfile dependency should rebuild
+ testdir = os.path.join("test cases/cython", '2 generated sources')
+ env = get_fake_env(testdir, self.builddir, self.prefix)
+ try:
+ cython = detect_compiler_for(env, "cython", MachineChoice.HOST)
+ if not version_compare(cython.version, '>=0.29.33'):
+ raise SkipTest('Cython is too old')
+ except EnvironmentException:
+ raise SkipTest("Cython is not installed")
+ self.init(testdir)
+
+ targets = self.introspect('--targets')
+ for target in targets:
+ if target['name'].startswith('simpleinclude'):
+ name = target['name']
+ self.build()
+ self.utime(os.path.join(testdir, 'simplestuff.pxi'))
+ self.assertBuildRelinkedOnlyTarget(name)
+
+
def test_internal_include_order(self):
if mesonbuild.environment.detect_msys2_arch() and ('MESON_RSP_THRESHOLD' in os.environ):
raise SkipTest('Test does not yet support gcc rsp files on msys2')