diff options
author | Luca Weiss <luca@z3ntu.xyz> | 2020-12-08 22:37:05 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-02-07 22:43:00 +0200 |
commit | 398df5629863e913fa603cbf02c525a9f501f8a8 (patch) | |
tree | 4ca64a52c67ef6d79ee0ee609ff23c6218551fed /run_unittests.py | |
parent | a855bcab1ccaff68155374c53896c1a780337f40 (diff) | |
download | meson-398df5629863e913fa603cbf02c525a9f501f8a8.zip meson-398df5629863e913fa603cbf02c525a9f501f8a8.tar.gz meson-398df5629863e913fa603cbf02c525a9f501f8a8.tar.bz2 |
Add Qt6 module
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 3f97c0c..23bdff4 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -6478,6 +6478,26 @@ class LinuxlikeTests(BasePlatformTests): self.assertRegex('\n'.join(mesonlog), r'Run-time dependency qt5 \(modules: Core\) found: YES .* \((qmake|qmake-qt5)\)\n') + def test_qt6dependency_qmake_detection(self): + ''' + Test that qt6 detection with qmake works. This can't be an ordinary + test case because it involves setting the environment. + ''' + # Verify that qmake is for Qt5 + if not shutil.which('qmake-qt6'): + if not shutil.which('qmake'): + raise unittest.SkipTest('QMake not found') + output = subprocess.getoutput('qmake --version') + if 'Qt version 6' not in output: + raise unittest.SkipTest('Qmake found, but it is not for Qt 6.') + # Disable pkg-config codepath and force searching with qmake/qmake-qt6 + testdir = os.path.join(self.framework_test_dir, '4 qt') + self.init(testdir, extra_args=['-Dmethod=qmake']) + # Confirm that the dependency was found with qmake + mesonlog = self.get_meson_log() + self.assertRegex('\n'.join(mesonlog), + r'Run-time dependency qt6 \(modules: Core\) found: YES .* \((qmake|qmake-qt6)\)\n') + def glob_sofiles_without_privdir(self, g): files = glob(g) return [f for f in files if not f.endswith('.p')] |