aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-07-02 20:37:59 +0300
committerGitHub <noreply@github.com>2018-07-02 20:37:59 +0300
commit1c44afdeed636f90a1e2685cba4143eacde21887 (patch)
treefae2555335f85911e811a719fc125b4ff1de9b03 /run_unittests.py
parent1ec3c790567d230e994500a6edb44a26c2d64968 (diff)
parentcc58fdac33fad6f9af328b2bdc26fcd5c0274b84 (diff)
downloadmeson-1c44afdeed636f90a1e2685cba4143eacde21887.zip
meson-1c44afdeed636f90a1e2685cba4143eacde21887.tar.gz
meson-1c44afdeed636f90a1e2685cba4143eacde21887.tar.bz2
Merge pull request #3823 from mesonbuild/nirbheek/fix-featurenew-subprojects
Nirbheek/fix featurenew subprojects
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 480ae2e..b6ad20d 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -2271,6 +2271,21 @@ recommended as it is not supported on some platforms''')
arches = set(arches[1:])
self.assertEqual(arches, set(mesonbuild.environment.known_cpu_families))
+ def test_feature_check_usage_subprojects(self):
+ testdir = os.path.join(self.unit_test_dir, '34 featurenew subprojects')
+ out = self.init(testdir)
+ # Parent project warns correctly
+ self.assertRegex(out, "WARNING: Project targetting '>=0.45'.*'0.47.0': dict")
+ # Subproject warns correctly
+ self.assertRegex(out, "|WARNING: Project targetting '>=0.40'.*'0.44.0': disabler")
+ # Subproject has a new-enough meson_version, no warning
+ self.assertNotRegex(out, "WARNING: Project targetting.*Python")
+ # Ensure a summary is printed in the subproject and the outer project
+ self.assertRegex(out, "|WARNING: Project specifies a minimum meson_version '>=0.40'")
+ self.assertRegex(out, "| * 0.44.0: {'disabler'}")
+ self.assertRegex(out, "WARNING: Project specifies a minimum meson_version '>=0.45'")
+ self.assertRegex(out, " * 0.47.0: {'dict'}")
+
class FailureTests(BasePlatformTests):
'''
@@ -2493,6 +2508,11 @@ class FailureTests(BasePlatformTests):
".*WARNING.*Project targetting.*but.*",
meson_version='>= 0.47.0')
+ def test_using_too_recent_feature_dependency(self):
+ self.assertMesonOutputs("dependency('pcap', required: false)",
+ ".*WARNING.*Project targetting.*but.*",
+ meson_version='>= 0.41.0')
+
class WindowsTests(BasePlatformTests):
'''