forked from qt-creator/qt-creator
Tests: Fix android autotest
While at it add qbs build files. Change-Id: I2a57f7addda9e980a9e429a3d69e0994dac6d120 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -12,6 +12,7 @@ add_qtc_test(tst_avdmanageroutputparser
|
||||
)
|
||||
|
||||
qtc_add_resources(tst_avdmanageroutputparser tst_avdmanageroutputparser_rcc
|
||||
PREFIX "/"
|
||||
FILES
|
||||
Test.avd/config.ini
|
||||
TestTablet.avd/config.ini
|
||||
|
||||
34
tests/auto/android/android.qbs
Normal file
34
tests/auto/android/android.qbs
Normal file
@@ -0,0 +1,34 @@
|
||||
import qbs
|
||||
|
||||
QtcAutotest {
|
||||
name: "Android AVD Manager autotest"
|
||||
Depends { name: "Utils" }
|
||||
Depends { name: "Qt.network" }
|
||||
|
||||
property string androidDir: project.ide_source_tree + "/src/plugins/android/"
|
||||
|
||||
Group {
|
||||
name: "Sources from Android plugin"
|
||||
prefix: androidDir
|
||||
files: [
|
||||
"androiddeviceinfo.cpp", "androiddeviceinfo.h",
|
||||
"avdmanageroutputparser.cpp", "avdmanageroutputparser.h",
|
||||
]
|
||||
}
|
||||
Group {
|
||||
name: "Test sources"
|
||||
files: [
|
||||
"tst_avdmanageroutputparser.cpp",
|
||||
]
|
||||
}
|
||||
|
||||
Group {
|
||||
name: "Resource files"
|
||||
Qt.core.resourcePrefix: "/"
|
||||
Qt.core.resourceSourceBase: "."
|
||||
fileTags: "qt.core.resource_data"
|
||||
files: ["Test.avd/config.ini", "TestTablet.avd/config.ini"]
|
||||
}
|
||||
|
||||
cpp.includePaths: base.concat([androidDir, project.ide_source_tree + "/src/plugins/"])
|
||||
}
|
||||
@@ -51,7 +51,7 @@ void tst_AvdManagerOutputParser::parse_data()
|
||||
QTest::newRow("one") << "Available Android Virtual Devices:\n"
|
||||
" Name: Test\n"
|
||||
" Device: Galaxy Nexus (Google)\n"
|
||||
" Path: :Test.avd\n"
|
||||
" Path: :/Test.avd\n"
|
||||
" Target: Google APIs (Google Inc.)\n"
|
||||
" Based on: Android API 30 Tag/ABI: google_apis/x86\n"
|
||||
" Sdcard: 512 MB\n"
|
||||
@@ -61,20 +61,20 @@ void tst_AvdManagerOutputParser::parse_data()
|
||||
-1,
|
||||
IDevice::DeviceConnected,
|
||||
IDevice::Emulator,
|
||||
Utils::FilePath::fromString(":Test.avd")}})
|
||||
Utils::FilePath::fromString(":/Test.avd")}})
|
||||
<< QStringList();
|
||||
|
||||
QTest::newRow("two") << "Available Android Virtual Devices:\n"
|
||||
" Name: Test\n"
|
||||
" Device: Galaxy Nexus (Google)\n"
|
||||
" Path: :Test.avd\n"
|
||||
" Path: :/Test.avd\n"
|
||||
" Target: Google APIs (Google Inc.)\n"
|
||||
" Based on: Android API 30 Tag/ABI: google_apis/x86\n"
|
||||
" Sdcard: 512 MB\n"
|
||||
"---------\n"
|
||||
" Name: TestTablet\n"
|
||||
" Device: 7in WSVGA (Tablet) (Generic)\n"
|
||||
" Path: :TestTablet.avd\n"
|
||||
" Path: :/TestTablet.avd\n"
|
||||
" Target: Google APIs (Google Inc.)\n"
|
||||
" Based on: Android API 30 Tag/ABI: google_apis/x86\n"
|
||||
" Sdcard: 256 MB\n"
|
||||
@@ -84,14 +84,14 @@ void tst_AvdManagerOutputParser::parse_data()
|
||||
-1,
|
||||
IDevice::DeviceConnected,
|
||||
IDevice::Emulator,
|
||||
Utils::FilePath::fromString(":Test.avd")},
|
||||
Utils::FilePath::fromString(":/Test.avd")},
|
||||
{"",
|
||||
"TestTablet",
|
||||
{"x86"},
|
||||
-1,
|
||||
IDevice::DeviceConnected,
|
||||
IDevice::Emulator,
|
||||
Utils::FilePath::fromString(":TestTablet.avd")}}
|
||||
Utils::FilePath::fromString(":/TestTablet.avd")}}
|
||||
)
|
||||
<< QStringList();
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ Project {
|
||||
references: [
|
||||
"aggregation/aggregation.qbs",
|
||||
"algorithm/algorithm.qbs",
|
||||
"android/android.qbs",
|
||||
"changeset/changeset.qbs",
|
||||
"cplusplus/cplusplus.qbs",
|
||||
"debugger/debugger.qbs",
|
||||
|
||||
Reference in New Issue
Block a user