diff options
author | Alexis Jeandet <alexis.jeandet@member.fsf.org> | 2018-09-16 18:12:09 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-09-17 21:27:49 +0300 |
commit | 32111746ba8f7b870a326d4f069b6a235c082f05 (patch) | |
tree | 1cac6318bef8f7f61ca8578dd6f7cb69766af3a7 | |
parent | eb7ed4dafbcd82a88a106ef088e126373ee11738 (diff) | |
download | meson-32111746ba8f7b870a326d4f069b6a235c082f05.zip meson-32111746ba8f7b870a326d4f069b6a235c082f05.tar.gz meson-32111746ba8f7b870a326d4f069b6a235c082f05.tar.bz2 |
Fix broken unit test qt5dependency_pkgconfig_detection
-It tests both Qt4 and Qt5 detection -> qtdependency_pkgconfig_detection
-It doesn't need to skip test if Qt4 isn't found and if Qt5 isn't, the
meson.build file already skips the test.
-The regex was outdated and since skipped because of Qt4 it is silently
broken for a long time.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
-rwxr-xr-x | run_unittests.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/run_unittests.py b/run_unittests.py index bd0103b..e9e9abf 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -3335,23 +3335,23 @@ class LinuxlikeTests(BasePlatformTests): self.assertIn(" -Werror ", c_command) @skipIfNoPkgconfig - def test_qt5dependency_pkgconfig_detection(self): + def test_qtdependency_pkgconfig_detection(self): ''' Test that qt4 and qt5 detection with pkgconfig works. ''' # Verify Qt4 or Qt5 can be found with pkg-config 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, ['-Dmethod=pkg-config']) # Confirm that the dependency was found with pkg-config mesonlog = self.get_meson_log() - self.assertRegex('\n'.join(mesonlog), - r'Dependency qt4 \(modules: Core\) found: YES .*, `pkg-config`\n') - self.assertRegex('\n'.join(mesonlog), - r'Dependency qt5 \(modules: Core\) found: YES .*, `pkg-config`\n') + if qt4 == 0: + self.assertRegex('\n'.join(mesonlog), + r'Dependency qt4 \(modules: Core\) found: YES 4.* \(pkg-config\)\n') + if qt5 == 0: + self.assertRegex('\n'.join(mesonlog), + r'Dependency qt5 \(modules: Core\) found: YES 5.* \(pkg-config\)\n') def test_generate_gir_with_address_sanitizer(self): if is_cygwin(): |