diff options
author | Christian Stenger <christian.stenger@qt.io> | 2019-06-18 10:59:25 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2019-06-25 07:46:50 +0000 |
commit | e6ede1d99756de7cca4ae8429664be0ffee1e0f6 (patch) | |
tree | 08f997cc29cf0aee3a934114b54e7354c5299653 | |
parent | d1c226d70bffba666806c1d1de8f2d8718fc3140 (diff) |
AutoTest: Limit condition for test execution to Linux
gcc and clang are handling builtin include paths differently.
On Linux the default should be gcc - which works fine even
if boost is installed in /usr/local.
On macOS clang is default which does have the correct builtin
include paths only for Qbs but we are testing on qmake as well.
So, expect the BOOST_INCLUDE_DIR set on macOS if we want to
have this test executed.
Change-Id: Ib9ad697b59bfad5413ad984c9b969ec8b174ae9a
Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r-- | src/plugins/autotest/autotestunittests.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/autotest/autotestunittests.cpp b/src/plugins/autotest/autotestunittests.cpp index eeeeb599de..614a61a6c2 100644 --- a/src/plugins/autotest/autotestunittests.cpp +++ b/src/plugins/autotest/autotestunittests.cpp @@ -77,8 +77,9 @@ void AutoTestUnitTests::initTestCase() if (!qgetenv("BOOST_INCLUDE_DIR").isEmpty()) { m_checkBoost = true; } else { - if (QFileInfo::exists("/usr/include/boost/version.hpp") - || QFileInfo::exists("/usr/local/include/boost/version.hpp")) { + if (Utils::HostOsInfo::isLinuxHost() + && (QFileInfo::exists("/usr/include/boost/version.hpp") + || QFileInfo::exists("/usr/local/include/boost/version.hpp"))) { qDebug() << "Found boost at system level - will run boost parser test."; m_checkBoost = true; } |