aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorAaron Small <a.small@unb.ca>2017-03-26 23:05:03 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2017-03-27 21:59:28 +0300
commitb5e30fd8e09182473f31d7865d6b8dc5823788cd (patch)
tree064c67c3a2147f726fd4eccc9013d5870e049120 /run_unittests.py
parentff4b32741acb36e8b2cf3d83fe0d513ad5753e59 (diff)
downloadmeson-b5e30fd8e09182473f31d7865d6b8dc5823788cd.zip
meson-b5e30fd8e09182473f31d7865d6b8dc5823788cd.tar.gz
meson-b5e30fd8e09182473f31d7865d6b8dc5823788cd.tar.bz2
Fix qt4 tool location detection, which may result in incorrectly picking
up qt5 tools when using the qt4 module.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index a11e3a5..1865a52 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -1023,6 +1023,25 @@ class LinuxlikeTests(BasePlatformTests):
self.assertIn("'-Werror'", vala_command)
self.assertIn("'-Werror'", c_command)
+ def test_qt5dependency_pkgconfig_detection(self):
+ '''
+ Test that qt4 and qt5 detection with pkgconfig works.
+ '''
+ # Verify Qt4 or Qt5 can be found with pkg-config
+ if not shutil.which('pkg-config'):
+ raise unittest.SkipTest('pkg-config not found')
+ qt4 = subprocess.call(['pkg-config', '--exists', 'QtCore'])
+ qt5 = subprocess.call(['pkg-config', '--exists', 'Qt5Core'])
+ if qt4 != 0 or qt5 != 0:
+ raise unittest.SkipTest('Qt not found with pkg-config')
+ testdir = os.path.join(self.framework_test_dir, '4 qt')
+ self.init(testdir)
+ # Confirm that the dependency was found with qmake
+ msg = 'Qt4 native `pkg-config` dependency (modules: Core, Gui) found: YES\n'
+ msg2 = 'Qt5 native `pkg-config` dependency (modules: Core, Gui) found: YES\n'
+ mesonlog = self.get_meson_log()
+ self.assertTrue(msg in mesonlog or msg2 in mesonlog)
+
def test_qt5dependency_qmake_detection(self):
'''
Test that qt5 detection with qmake works. This can't be an ordinary