aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/blackbox/testdata-joblimits/job-limits/job-limits.qbs6
-rw-r--r--tests/auto/blackbox/testdata/module-providers/module-providers.qbs1
-rw-r--r--tests/auto/blackbox/testdata/multiplexed-tool/multiplexed-tool.qbs8
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp3
-rw-r--r--tests/auto/blackbox/tst_blackboxjoblimits.cpp8
5 files changed, 25 insertions, 1 deletions
diff --git a/tests/auto/blackbox/testdata-joblimits/job-limits/job-limits.qbs b/tests/auto/blackbox/testdata-joblimits/job-limits/job-limits.qbs
index 221105a64..ff71de946 100644
--- a/tests/auto/blackbox/testdata-joblimits/job-limits/job-limits.qbs
+++ b/tests/auto/blackbox/testdata-joblimits/job-limits/job-limits.qbs
@@ -55,6 +55,12 @@ Project {
}
}
Product {
+ property bool _testPlatform: {
+ var result = qbs.targetPlatform === qbs.hostPlatform;
+ if (!result)
+ console.info("targetPlatform differs from hostPlatform");
+ return result;
+ }
name: "p"
type: "tool_out"
Depends { name: "tool" }
diff --git a/tests/auto/blackbox/testdata/module-providers/module-providers.qbs b/tests/auto/blackbox/testdata/module-providers/module-providers.qbs
index 0322cc0e0..781a3ca03 100644
--- a/tests/auto/blackbox/testdata/module-providers/module-providers.qbs
+++ b/tests/auto/blackbox/testdata/module-providers/module-providers.qbs
@@ -23,6 +23,7 @@ Project {
Depends { name: "othergenerator" }
Profile {
name: "myProfile"
+ baseProfile: project.profile
moduleProviders.mygenerator.chooseLettersFrom: product.end
moduleProviders.othergenerator.someDefines: "app2"
}
diff --git a/tests/auto/blackbox/testdata/multiplexed-tool/multiplexed-tool.qbs b/tests/auto/blackbox/testdata/multiplexed-tool/multiplexed-tool.qbs
index 3994bd95f..7f620f310 100644
--- a/tests/auto/blackbox/testdata/multiplexed-tool/multiplexed-tool.qbs
+++ b/tests/auto/blackbox/testdata/multiplexed-tool/multiplexed-tool.qbs
@@ -2,12 +2,20 @@ Project {
CppApplication {
name: "tool"
consoleApplication: true
+ property bool _testPlatform: {
+ var result = qbs.targetPlatform === qbs.hostPlatform;
+ if (!result)
+ console.info("targetPlatform differs from hostPlatform");
+ return result;
+ }
Profile {
name: "debugProfile"
+ baseProfile: project.profile
qbs.buildVariant: "debug"
}
Profile {
name: "releaseProfile"
+ baseProfile: project.profile
qbs.buildVariant: "release"
}
multiplexByQbsProperties: "profiles"
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index b08df0a9e..335934882 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -5178,6 +5178,9 @@ void TestBlackbox::multipleConfigurations()
void TestBlackbox::multiplexedTool()
{
QDir::setCurrent(testDataDir + "/multiplexed-tool");
+ QCOMPARE(runQbs(QStringLiteral("resolve")), 0);
+ if (m_qbsStdout.contains("targetPlatform differs from hostPlatform"))
+ QSKIP("Cannot run binaries in cross-compiled build");
QCOMPARE(runQbs(), 0);
QCOMPARE(m_qbsStdout.count("creating tool.out"), 4);
}
diff --git a/tests/auto/blackbox/tst_blackboxjoblimits.cpp b/tests/auto/blackbox/tst_blackboxjoblimits.cpp
index 89b5f638e..98e1acf89 100644
--- a/tests/auto/blackbox/tst_blackboxjoblimits.cpp
+++ b/tests/auto/blackbox/tst_blackboxjoblimits.cpp
@@ -143,13 +143,19 @@ void TestBlackboxJobLimits::jobLimits()
SettingsPtr theSettings = settings();
qbs::Internal::TemporaryProfile profile("jobLimitsProfile", theSettings.get());
profile.p.setValue("preferences.jobLimit.singleton", prefsJobCount);
+ profile.p.setValue("baseProfile", profileName());
theSettings->sync();
QbsRunParameters resolveParams("resolve");
resolveParams.profile = profile.p.name();
resolveParams.arguments << ("project.projectJobCount:" + QString::number(projectJobCount))
<< ("project.productJobCount:" + QString::number(productJobCount))
- << ("project.moduleJobCount:" + QString::number(moduleJobCount));
+ << ("project.moduleJobCount:" + QString::number(moduleJobCount))
+ << ("--force-probe-execution");
QCOMPARE(runQbs(resolveParams), 0);
+
+ if (m_qbsStdout.contains("targetPlatform differs from hostPlatform"))
+ QSKIP("Skip test in cross-compiled build");
+
QbsRunParameters buildParams;
buildParams.expectFailure = !expectSuccess;
if (cliJobCount != -1)