aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/tst_blackboxandroid.cpp
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-10-19 10:41:32 +0200
committerJake Petroules <jake.petroules@qt.io>2017-11-29 17:44:31 +0000
commitb3df879ed9dee5872fa2c1f3ee0594ae07dd80bb (patch)
treebcc3d5bb1d6d6fda8e890ae8a16f4564b984929b /tests/auto/blackbox/tst_blackboxandroid.cpp
parent1c4bd7dbc940b64238808c33f4a62e6d5d4eeca0 (diff)
Don't rely on a qbs-autotests_android profile for autotests
Instead, simply set the qbs.targetPlatform property for the relevant products. Change-Id: Ia39cf6d4f729783b0d7fb85a83023f438b9e3e20 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/blackbox/tst_blackboxandroid.cpp')
-rw-r--r--tests/auto/blackbox/tst_blackboxandroid.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/auto/blackbox/tst_blackboxandroid.cpp b/tests/auto/blackbox/tst_blackboxandroid.cpp
index a06dbbf8e..5f24f194a 100644
--- a/tests/auto/blackbox/tst_blackboxandroid.cpp
+++ b/tests/auto/blackbox/tst_blackboxandroid.cpp
@@ -66,14 +66,6 @@ TestBlackboxAndroid::TestBlackboxAndroid()
{
}
-void TestBlackboxAndroid::validateTestProfile()
-{
- const SettingsPtr s = settings();
- Profile p("qbs_autotests-android", s.get());
- if (!p.exists())
- QSKIP("No Android test profile");
-}
-
void TestBlackboxAndroid::android()
{
QFETCH(QString, projectDir);
@@ -81,12 +73,19 @@ void TestBlackboxAndroid::android()
QFETCH(QList<QByteArrayList>, expectedFilesLists);
const SettingsPtr s = settings();
- Profile p("qbs_autotests-android", s.get());
+ Profile p(profileName(), s.get());
int status;
const auto androidPaths = findAndroid(&status, p.name());
QCOMPARE(status, 0);
+ const auto sdkPath = androidPaths["sdk"];
+ if (sdkPath.isEmpty())
+ QSKIP("Android SDK is not installed");
+
const auto ndkPath = androidPaths["ndk"];
+ if (ndkPath.isEmpty() && projectDir != "no-native")
+ QSKIP("Android NDK is not installed");
+
const auto ndkSamplesPath = androidPaths["ndk-samples"];
static const QStringList ndkSamplesDirs = QStringList() << "teapot" << "no-native";
if (!ndkPath.isEmpty() && !QFileInfo(ndkSamplesPath).isDir()
@@ -157,7 +156,7 @@ void TestBlackboxAndroid::android()
void TestBlackboxAndroid::android_data()
{
const SettingsPtr s = settings();
- const Profile p("qbs_autotests-android", s.get());
+ const Profile p(profileName(), s.get());
QStringList archsStringList = p.value(QLatin1String("qbs.architectures")).toStringList();
if (archsStringList.empty())
archsStringList << QStringLiteral("armv7a"); // must match default in common.qbs