From 610e5d4a7122964d2e14c3c77585ce478704f976 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Fri, 2 Mar 2018 12:36:59 +0000 Subject: [PATCH] Invoke 'qmake --version' correctly in test_qt5dependency_qmake_detection subprocess.getoutput() takes a string, not a list. I'm going to guess this is the cause of the mysterious behaviour alluded to in the comment... --- run_unittests.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/run_unittests.py b/run_unittests.py index c2299ca7d..851b61f46 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -2270,11 +2270,8 @@ class LinuxlikeTests(BasePlatformTests): if not shutil.which('qmake-qt5'): if not shutil.which('qmake'): raise unittest.SkipTest('QMake not found') - # For some inexplicable reason qmake --version gives different - # results when run from the command line vs invoked by Python. - # Check for both cases in case this behavior changes in the future. - output = subprocess.getoutput(['qmake', '--version']) - if 'Qt version 5' not in output and 'qt5' not in output: + output = subprocess.getoutput('qmake --version') + if 'Qt version 5' not in output: raise unittest.SkipTest('Qmake found, but it is not for Qt 5.') # Disable pkg-config codepath and force searching with qmake/qmake-qt5 testdir = os.path.join(self.framework_test_dir, '4 qt')