aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-04-01 18:20:08 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2020-04-17 08:50:39 +0000
commitafe4a45ba4f8692f934ac27deb0787c3f526f66a (patch)
tree90ffd74609f78531fc9dd6921debcf3563787a34
parent04240d47225f06eb36df4eec2270813a78a44344 (diff)
Fix new tests for iOS
Change-Id: I2c82a6a9149602ba48ac654f271d53b21e7abfca Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs7
-rw-r--r--tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs6
-rw-r--r--tests/auto/blackbox/testdata/sanitizer/sanitizer.qbs4
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp5
4 files changed, 21 insertions, 1 deletions
diff --git a/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs b/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs
index b7a594c13..353a40f8c 100644
--- a/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs
+++ b/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs
@@ -3,7 +3,12 @@ import qbs
CppApplication {
name: "grpc_cpp"
consoleApplication: true
- condition: hasDependencies
+ condition: {
+ var result = qbs.targetPlatform === qbs.hostPlatform;
+ if (!result)
+ console.info("targetPlatform differs from hostPlatform");
+ return result && hasDependencies;
+ }
Depends { name: "cpp" }
cpp.cxxLanguageVersion: "c++11"
diff --git a/tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs b/tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs
index b6b862d1c..e1e722764 100644
--- a/tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs
+++ b/tests/auto/blackbox/testdata/host-os-properties/host-os-properties.qbs
@@ -1,4 +1,10 @@
CppApplication {
+ condition: {
+ var result = qbs.targetPlatform === qbs.hostPlatform;
+ if (!result)
+ console.info("targetPlatform differs from hostPlatform");
+ return result;
+ }
consoleApplication: true
cpp.defines: [
'HOST_ARCHITECTURE="' + qbs.hostArchitecture + '"',
diff --git a/tests/auto/blackbox/testdata/sanitizer/sanitizer.qbs b/tests/auto/blackbox/testdata/sanitizer/sanitizer.qbs
index 7b5054316..e5db199dc 100644
--- a/tests/auto/blackbox/testdata/sanitizer/sanitizer.qbs
+++ b/tests/auto/blackbox/testdata/sanitizer/sanitizer.qbs
@@ -9,6 +9,10 @@ CppApplication {
return false;
if (qbs.toolchain.contains("mingw"))
return false;
+ if (qbs.targetOS.contains("ios")) {
+ // thread sanitizer is not supported
+ return sanitizer !== "thread";
+ }
return true;
}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 25e36816c..fcc2ab3d6 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -8127,6 +8127,8 @@ void TestBlackbox::grpc()
QVERIFY2(withGrpc || withoutGrpc, m_qbsStdout.constData());
if (withoutGrpc)
QSKIP("grpc module not present");
+ if (m_qbsStdout.contains("targetPlatform differs from hostPlatform"))
+ QSKIP("Cannot run binaries in cross-compiled build");
QbsRunParameters runParams;
QCOMPARE(runQbs(runParams), 0);
@@ -8135,6 +8137,9 @@ void TestBlackbox::grpc()
void TestBlackbox::hostOsProperties()
{
QDir::setCurrent(testDataDir + "/host-os-properties");
+ QCOMPARE(runQbs(QStringLiteral("resolve")), 0);
+ if (m_qbsStdout.contains("targetPlatform differs from hostPlatform"))
+ QSKIP("Cannot run binaries in cross-compiled build");
QCOMPARE(runQbs(QStringLiteral("run")), 0);
QVERIFY2(m_qbsStdout.contains(
("HOST_ARCHITECTURE = " + HostOsInfo::hostOSArchitecture()).data()),