aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/testdata-java/java/vehicles.qbs7
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp16
-rw-r--r--tests/auto/blackbox/tst_blackboxandroid.cpp4
-rw-r--r--tests/auto/blackbox/tst_blackboxapple.cpp2
-rw-r--r--tests/auto/blackbox/tst_blackboxjava.cpp3
5 files changed, 32 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata-java/java/vehicles.qbs b/tests/auto/blackbox/testdata-java/java/vehicles.qbs
index fa632b7b3..633ee5abd 100644
--- a/tests/auto/blackbox/testdata-java/java/vehicles.qbs
+++ b/tests/auto/blackbox/testdata-java/java/vehicles.qbs
@@ -10,6 +10,13 @@ Project {
bundle.isBundle: false
}
+ property bool _testPlatform: {
+ var result = qbs.targetPlatform === qbs.hostPlatform;
+ if (!result)
+ console.info("targetPlatform differs from hostPlatform");
+ return result;
+ }
+
name: "native"
files: ["engine.c"]
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 335934882..59240642c 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -1392,6 +1392,9 @@ void TestBlackbox::vcsSubversion()
if (svnFilePath.isEmpty())
QSKIP("svn not found");
+ if (HostOsInfo::isWindowsHost() && qEnvironmentVariableIsSet("GITHUB_ACTIONS"))
+ QSKIP("Skip this test when running on GitHub");
+
// Set up repo.
QTemporaryDir repoDir;
QVERIFY(repoDir.isValid());
@@ -7408,6 +7411,9 @@ void TestBlackbox::nodejs()
void TestBlackbox::typescript()
{
+ if (qEnvironmentVariableIsSet("GITHUB_ACTIONS"))
+ QSKIP("Skip this test when running on GitHub");
+
const SettingsPtr s = settings();
Profile p(profileName(), s.get());
@@ -7525,6 +7531,9 @@ void TestBlackbox::innoSetup()
return;
}
+ if (HostOsInfo::isWindowsHost() && qEnvironmentVariableIsSet("GITHUB_ACTIONS"))
+ QSKIP("Skip this test when running on GitHub");
+
QDir::setCurrent(testDataDir + "/innosetup");
QCOMPARE(runQbs(), 0);
QVERIFY(m_qbsStdout.contains("compiling test.iss"));
@@ -7535,6 +7544,9 @@ void TestBlackbox::innoSetup()
void TestBlackbox::innoSetupDependencies()
{
+ if (HostOsInfo::isWindowsHost() && qEnvironmentVariableIsSet("GITHUB_ACTIONS"))
+ QSKIP("Skip this test when running on GitHub");
+
const SettingsPtr s = settings();
Profile profile(profileName(), s.get());
@@ -7813,6 +7825,10 @@ void TestBlackbox::fallbackModuleProvider()
QFETCH(bool, fallbacksEnabledGlobally);
QFETCH(QStringList, pkgConfigLibDirs);
QFETCH(bool, successExpected);
+
+ if (HostOsInfo::isWindowsHost() && qEnvironmentVariableIsSet("GITHUB_ACTIONS"))
+ QSKIP("Skip this test when running on GitHub");
+
QDir::setCurrent(testDataDir + "/fallback-module-provider");
static const auto b2s = [](bool b) { return QString(b ? "true" : "false"); };
QbsRunParameters resolveParams("resolve",
diff --git a/tests/auto/blackbox/tst_blackboxandroid.cpp b/tests/auto/blackbox/tst_blackboxandroid.cpp
index 5e850874e..15b84a13b 100644
--- a/tests/auto/blackbox/tst_blackboxandroid.cpp
+++ b/tests/auto/blackbox/tst_blackboxandroid.cpp
@@ -84,6 +84,10 @@ void TestBlackboxAndroid::android()
QFETCH(bool, generateAab);
QFETCH(bool, isIncrementalBuild);
+ // skip tests on github except when run in docker - this var is not propagated into the image
+ if (qEnvironmentVariableIsSet("GITHUB_ACTIONS"))
+ QSKIP("Skip Android tests when running on GitHub");
+
const SettingsPtr s = settings();
Profile p(theProfileName(projectDir == "qml-app"), s.get());
if (!p.exists())
diff --git a/tests/auto/blackbox/tst_blackboxapple.cpp b/tests/auto/blackbox/tst_blackboxapple.cpp
index d76aaf897..ea0d2ac58 100644
--- a/tests/auto/blackbox/tst_blackboxapple.cpp
+++ b/tests/auto/blackbox/tst_blackboxapple.cpp
@@ -759,6 +759,8 @@ void TestBlackboxApple::deploymentTarget_data()
void TestBlackboxApple::dmg()
{
+ if (qEnvironmentVariableIsSet("GITHUB_ACTIONS"))
+ QSKIP("Skip this test when running on GitHub");
QDir::setCurrent(testDataDir + "/apple-dmg");
QCOMPARE(runQbs(), 0);
}
diff --git a/tests/auto/blackbox/tst_blackboxjava.cpp b/tests/auto/blackbox/tst_blackboxjava.cpp
index a815a84ff..4400e1a35 100644
--- a/tests/auto/blackbox/tst_blackboxjava.cpp
+++ b/tests/auto/blackbox/tst_blackboxjava.cpp
@@ -73,6 +73,9 @@ void TestBlackboxJava::java()
QSKIP("java.jdkPath not set and automatic detection failed");
}
+ if (m_qbsStdout.contains("targetPlatform differs from hostPlatform"))
+ QSKIP("Skip test in cross-compiled build");
+
QCOMPARE(status, 0);
const QStringList classFiles =