aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-10-27 15:48:32 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2020-11-01 19:26:31 +0200
commit47d071a34f1e1539b1b354cfda309dac1b905232 (patch)
treebc31a740d67259768fea0e9d74069be9c36363f3 /run_unittests.py
parentd4eec9664bb96a093b92c3e1f565806686ea0ccb (diff)
downloadmeson-47d071a34f1e1539b1b354cfda309dac1b905232.zip
meson-47d071a34f1e1539b1b354cfda309dac1b905232.tar.gz
meson-47d071a34f1e1539b1b354cfda309dac1b905232.tar.bz2
interpreter: store correct files for project regeneration
Right now sub-sub projects are not correctly registered, because we don't have a way to pass up past the first level of subproject. This patch changes that by making the build_Def_files as defined in the Interpreter initializer accurate for translated dependencies, ie, cmake dependencies won't define a dependency on a non-existent meson.build. This means that it can always add the subi.build_def_files because they are always accurate.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index c7c6ba2..85292d1 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -5247,6 +5247,20 @@ recommended as it is not supported on some platforms''')
wrap = PackageDefinition(redirect_wrap)
self.assertEqual(wrap.get('url'), 'http://invalid')
+ @skip_if_no_cmake
+ def test_nested_cmake_rebuild(self) -> None:
+ # This checks a bug where if a non-meson project is used as a third
+ # level (or deeper) subproject it doesn't cause a rebuild if the build
+ # files for that project are changed
+ testdir = os.path.join(self.unit_test_dir, '85 nested subproject regenerate depends')
+ cmakefile = Path(testdir) / 'subprojects' / 'sub2' / 'CMakeLists.txt'
+ self.init(testdir)
+ self.build()
+ with cmakefile.open('a') as f:
+ os.utime(str(cmakefile))
+ self.assertReconfiguredBuildIsNoop()
+
+
class FailureTests(BasePlatformTests):
'''
Tests that test failure conditions. Build files here should be dynamically