aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-01-02 20:35:19 +0200
committerGitHub <noreply@github.com>2018-01-02 20:35:19 +0200
commitad54bc372694cf7fc6e173e41c56418651aac9f0 (patch)
tree85c710388fa6a45c22d163b498018ca2622553d9 /run_unittests.py
parent2ffdf48356b8beeb824fa6e2f581afbb23fe7b54 (diff)
parent851475db9b8772930276a29320a14714d3a4da92 (diff)
downloadmeson-ad54bc372694cf7fc6e173e41c56418651aac9f0.zip
meson-ad54bc372694cf7fc6e173e41c56418651aac9f0.tar.gz
meson-ad54bc372694cf7fc6e173e41c56418651aac9f0.tar.bz2
Merge pull request #2838 from mesonbuild/nirbheek/consolidate-subproject-dep-checking
intrp: Consolidate subproject dep checking and logging
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index dc2429a..e5011c3 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -1902,6 +1902,29 @@ class FailureTests(BasePlatformTests):
return
raise unittest.SkipTest("objc and objcpp found, can't test detection failure")
+ def test_subproject_variables(self):
+ '''
+ Test that:
+ 1. The correct message is outputted when a not-required dep is not
+ found and the fallback subproject is also not found.
+ 2. A not-found not-required dep with a fallback subproject outputs the
+ correct message when the fallback subproject is found but the
+ variable inside it is not.
+ 3. A fallback dependency is found from the subproject parsed in (2)
+ 4. A not-required fallback dependency is not found because the
+ subproject failed to parse.
+ '''
+ tdir = os.path.join(self.unit_test_dir, '20 subproj dep variables')
+ out = self.init(tdir, inprocess=True)
+ self.assertRegex(out, r"Also couldn't find a fallback subproject "
+ "in.*subprojects.*nosubproj.*for the dependency.*somedep")
+ self.assertRegex(out, r'Dependency.*somenotfounddep.*from subproject.*'
+ 'subprojects.*somesubproj.*found:.*NO')
+ self.assertRegex(out, r'Dependency.*zlibproxy.*from subproject.*'
+ 'subprojects.*somesubproj.*found:.*YES.*(cached)')
+ self.assertRegex(out, r'Also couldn\'t find a fallback subproject in '
+ '.*subprojects.*failingsubproj.*for the dependency.*somedep')
+
class WindowsTests(BasePlatformTests):
'''