aboutsummaryrefslogtreecommitdiff
path: root/unittests/allplatformstests.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-11-21 16:31:36 -0500
committerEli Schwartz <eschwartz@archlinux.org>2021-11-28 11:52:36 -0500
commitbea735dd76db32f6ea34ab66fee496d4be2f7eb1 (patch)
tree8ea80300099c25584d0893a6477064db55f33df1 /unittests/allplatformstests.py
parent69fa37e9ca885f55c92670bb228213db1b4ebbd8 (diff)
downloadmeson-bea735dd76db32f6ea34ab66fee496d4be2f7eb1.zip
meson-bea735dd76db32f6ea34ab66fee496d4be2f7eb1.tar.gz
meson-bea735dd76db32f6ea34ab66fee496d4be2f7eb1.tar.bz2
make sure files arguments to compiler.compiles and friends, performs rebuild
If the compiler check is updated as a string in meson.build, we force rebuild, which is a good thing since the outcome of that check changes the configuration context and can enable or disable parts of the build. If the compiler check came from a files() object then we didn't add a regen rule on those files. Fixes #1656
Diffstat (limited to 'unittests/allplatformstests.py')
-rw-r--r--unittests/allplatformstests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py
index 30c0572..daa1385 100644
--- a/unittests/allplatformstests.py
+++ b/unittests/allplatformstests.py
@@ -1965,6 +1965,13 @@ class AllPlatformTests(BasePlatformTests):
# cxx.links with C source
self.assertEqual(cmds[3][0], cc)
self.assertEqual(cmds[4][0], cxx)
+ if self.backend is Backend.ninja:
+ # updating the file to check causes a reconfigure
+ #
+ # only the ninja backend is competent enough to detect reconfigured
+ # no-op builds without build targets
+ self.utime(os.path.join(testdir, 'test.c'))
+ self.assertReconfiguredBuildIsNoop()
def test_ndebug_if_release_disabled(self):
testdir = os.path.join(self.unit_test_dir, '28 ndebug if-release')