From c0166355ceef5168b2f7b3c6cbace32e8dbafbb4 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 30 Jan 2019 15:28:02 +0530 Subject: Rewrite appleframework and extraframework dependency classes Instead of only doing a naive filesystem search, also run the linker so that it can tell us whether the -F path specified actually contains the framework we're looking for. Unfortunately, `extraframework` searching is still not 100% correct in the case when since we want to search in either /Library/Frameworks or in /System/Library/Frameworks but not in both. The -Z flag disables searching in those prefixes and would in theory allow this, but then you cannot force the linker to look in those by manually adding -F args, so that doesn't work. --- run_unittests.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'run_unittests.py') diff --git a/run_unittests.py b/run_unittests.py index f1bf5c6..b8b3192 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -3519,6 +3519,14 @@ class FailureTests(BasePlatformTests): self.assertMesonRaises("dependency('appleframeworks')", "requires at least one module") + def test_extraframework_dependency_method(self): + code = "dependency('python', method : 'extraframework')" + if not is_osx(): + self.assertMesonRaises(code, self.dnf) + else: + # Python2 framework is always available on macOS + self.assertMesonOutputs(code, '[Dd]ependency.*python.*found.*YES') + def test_sdl2_notfound_dependency(self): # Want to test failure, so skip if available if shutil.which('sdl2-config'): -- cgit v1.1