diff options
author | Cerbero <cerbero@gstreamer.freedesktop.org> | 2020-04-04 00:41:17 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-04-05 13:39:41 +0300 |
commit | df5113252b1ac2f10423aa7b9d1746d4071f38a2 (patch) | |
tree | b6a164ca137b344072a2cd6ef28c5fde864a5eed /run_unittests.py | |
parent | 0e50974f803f62910c5f92765d534aa5f73e7f8e (diff) | |
download | meson-df5113252b1ac2f10423aa7b9d1746d4071f38a2.zip meson-df5113252b1ac2f10423aa7b9d1746d4071f38a2.tar.gz meson-df5113252b1ac2f10423aa7b9d1746d4071f38a2.tar.bz2 |
qt dependency: Pick debug libraries based on b_vscrt
`b_vscrt` has existed forever, and is the canonical source for
which CRT to link to, and hence whether to use the debug libraries
or not.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index d1c10f5..96ead5a 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -5051,6 +5051,33 @@ class WindowsTests(BasePlatformTests): # Verify that a valid checksum was written by all other compilers self.assertTrue(pe.verify_checksum(), msg=msg) + def test_qt5dependency_vscrt(self): + ''' + Test that qt5 dependencies use the debug module suffix when b_vscrt is + set to 'mdd' + ''' + # Verify that the `b_vscrt` option is available + env = get_fake_env() + cc = env.detect_c_compiler(MachineChoice.HOST) + if 'b_vscrt' not in cc.base_options: + raise unittest.SkipTest('Compiler does not support setting the VS CRT') + # Verify that qmake is for Qt5 + if not shutil.which('qmake-qt5'): + if not shutil.which('qmake') and not is_ci(): + raise unittest.SkipTest('QMake not found') + output = subprocess.getoutput('qmake --version') + if 'Qt version 5' not in output and not is_ci(): + raise unittest.SkipTest('Qmake found, but it is not for Qt 5.') + # Setup with /MDd + testdir = os.path.join(self.framework_test_dir, '4 qt') + self.init(testdir, extra_args=['-Db_vscrt=mdd']) + # Verify that we're linking to the debug versions of Qt DLLs + build_ninja = os.path.join(self.builddir, 'build.ninja') + with open(build_ninja, 'r', encoding='utf-8') as f: + contents = f.read() + m = re.search('build qt5core.exe: cpp_LINKER.*Qt5Cored.lib', contents) + self.assertIsNotNone(m, msg=contents) + @unittest.skipUnless(is_osx(), "requires Darwin") class DarwinTests(BasePlatformTests): |