Make tests compile for Android
This only enables compilation, it doesn't fix any test. Qt on Android supports process, but not TEST_HELPER_INSTALLS. See also acdd57cb for winrt. android-ndk-r10e is used to compile, see http://doc-snapshots.qt.io/qt5-5.11/androidgs.html . corelib/io/{qdir,qresourceengine} need to be fixed later. Done-with: Frederik Gladhorn <frederik.gladhorn@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Change-Id: I34b924c8ae5d46d6835b8f0a6606450920f4423b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
parent
4c68e2558c
commit
c3059391fe
@ -1,6 +1,6 @@
|
|||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
|
|
||||||
!winrt {
|
!android:!winrt {
|
||||||
test.depends = app
|
test.depends = app
|
||||||
SUBDIRS += app
|
SUBDIRS += app
|
||||||
}
|
}
|
||||||
|
@ -7,5 +7,5 @@ QT = core testlib
|
|||||||
SOURCES = ../tst_qlogging.cpp
|
SOURCES = ../tst_qlogging.cpp
|
||||||
|
|
||||||
DEFINES += QT_MESSAGELOGCONTEXT
|
DEFINES += QT_MESSAGELOGCONTEXT
|
||||||
!winrt: TEST_HELPER_INSTALLS = ../app/app
|
!android:!winrt: TEST_HELPER_INSTALLS = ../app/app
|
||||||
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
|
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
|
||||||
|
@ -64,3 +64,8 @@ win32:!qtConfig(private_tests): SUBDIRS -= \
|
|||||||
|
|
||||||
winrt: SUBDIRS -= \
|
winrt: SUBDIRS -= \
|
||||||
qstorageinfo
|
qstorageinfo
|
||||||
|
|
||||||
|
android: SUBDIRS -= \
|
||||||
|
qprocess \
|
||||||
|
qdir \
|
||||||
|
qresourceengine
|
||||||
|
@ -85,6 +85,12 @@ QT_END_NAMESPACE
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#ifdef Q_OS_ANDROID
|
||||||
|
// Android introduces a braindamaged fileno macro that isn't
|
||||||
|
// compatible with the POSIX fileno or its own FILE type.
|
||||||
|
# undef fileno
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
#include "../../../network-settings.h"
|
#include "../../../network-settings.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,7 +40,7 @@ SUBDIRS=\
|
|||||||
# This test is only applicable on Windows
|
# This test is only applicable on Windows
|
||||||
!win32*|winrt: SUBDIRS -= qwineventnotifier
|
!win32*|winrt: SUBDIRS -= qwineventnotifier
|
||||||
|
|
||||||
android|uikit: SUBDIRS -= qclipboard qobject qsharedmemory qsystemsemaphore
|
android|uikit: SUBDIRS -= qobject qsharedmemory qsystemsemaphore
|
||||||
|
|
||||||
!qtConfig(systemsemaphore): SUBDIRS -= \
|
!qtConfig(systemsemaphore): SUBDIRS -= \
|
||||||
qsystemsemaphore
|
qsystemsemaphore
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
|
|
||||||
!winrt {
|
!android:!winrt {
|
||||||
test.depends = crashonexit
|
test.depends = crashonexit
|
||||||
SUBDIRS += crashonexit
|
SUBDIRS += crashonexit
|
||||||
}
|
}
|
||||||
|
@ -5,5 +5,5 @@ CONFIG += console
|
|||||||
QT = core testlib
|
QT = core testlib
|
||||||
SOURCES = ../tst_qthreadstorage.cpp
|
SOURCES = ../tst_qthreadstorage.cpp
|
||||||
|
|
||||||
!winrt: TEST_HELPER_INSTALLS = ../crashonexit/crashonexit
|
!android:!winrt: TEST_HELPER_INSTALLS = ../crashonexit/crashonexit
|
||||||
|
|
||||||
|
@ -16,4 +16,4 @@ win32 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
!winrt: TEST_HELPER_INSTALLS = ../syslocaleapp/syslocaleapp
|
!android:!winrt: TEST_HELPER_INSTALLS = ../syslocaleapp/syslocaleapp
|
||||||
|
@ -882,7 +882,7 @@ void tst_QTimeZone::icuTest()
|
|||||||
|
|
||||||
void tst_QTimeZone::tzTest()
|
void tst_QTimeZone::tzTest()
|
||||||
{
|
{
|
||||||
#if defined QT_BUILD_INTERNAL && defined Q_OS_UNIX && !defined Q_OS_DARWIN
|
#if defined QT_BUILD_INTERNAL && defined Q_OS_UNIX && !defined Q_OS_DARWIN && !defined Q_OS_ANDROID
|
||||||
// Known datetimes
|
// Known datetimes
|
||||||
qint64 std = QDateTime(QDate(2012, 1, 1), QTime(0, 0, 0), Qt::UTC).toMSecsSinceEpoch();
|
qint64 std = QDateTime(QDate(2012, 1, 1), QTime(0, 0, 0), Qt::UTC).toMSecsSinceEpoch();
|
||||||
qint64 dst = QDateTime(QDate(2012, 6, 1), QTime(0, 0, 0), Qt::UTC).toMSecsSinceEpoch();
|
qint64 dst = QDateTime(QDate(2012, 6, 1), QTime(0, 0, 0), Qt::UTC).toMSecsSinceEpoch();
|
||||||
|
@ -37,4 +37,4 @@ win32:!winrt:qtHaveModule(network): SUBDIRS += noqteventloop
|
|||||||
|
|
||||||
!qtConfig(opengl): SUBDIRS -= qopenglwindow
|
!qtConfig(opengl): SUBDIRS -= qopenglwindow
|
||||||
|
|
||||||
uikit: SUBDIRS -= qclipboard
|
android|uikit: SUBDIRS -= qclipboard
|
||||||
|
@ -13,6 +13,6 @@ win32 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
!winrt: TEST_HELPER_INSTALLS = \
|
!android:!winrt: TEST_HELPER_INSTALLS = \
|
||||||
../copier/copier \
|
../copier/copier \
|
||||||
../paster/paster
|
../paster/paster
|
||||||
|
@ -13,4 +13,4 @@ RESOURCES += ../qnetworkreply.qrc
|
|||||||
TESTDATA += ../empty ../rfc3252.txt ../resource ../bigfile ../*.jpg ../certs \
|
TESTDATA += ../empty ../rfc3252.txt ../resource ../bigfile ../*.jpg ../certs \
|
||||||
../index.html ../smb-file.txt
|
../index.html ../smb-file.txt
|
||||||
|
|
||||||
!winrt: TEST_HELPER_INSTALLS = ../echo/echo
|
!android:!winrt: TEST_HELPER_INSTALLS = ../echo/echo
|
||||||
|
@ -15,4 +15,4 @@ CONFIG(debug_and_release) {
|
|||||||
DESTDIR = ..
|
DESTDIR = ..
|
||||||
}
|
}
|
||||||
|
|
||||||
!winrt: TEST_HELPER_INSTALLS = ../lackey/lackey
|
!android:!winrt: TEST_HELPER_INSTALLS = ../lackey/lackey
|
||||||
|
6
tests/auto/other/qcomplextext/android_testdata.qrc
Normal file
6
tests/auto/other/qcomplextext/android_testdata.qrc
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="/android_testdata">
|
||||||
|
<file>data/BidiCharacterTest.txt</file>
|
||||||
|
<file>data/BidiTest.txt</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
@ -8,5 +8,7 @@ TESTDATA += data
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
testdata.qrc
|
android_testdata.qrc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
builtin_testdata: DEFINES += BUILTIN_TESTDATA
|
||||||
|
@ -15,5 +15,5 @@ win32 {
|
|||||||
RESOURCES += ../selftests.qrc
|
RESOURCES += ../selftests.qrc
|
||||||
|
|
||||||
include(../selftests.pri)
|
include(../selftests.pri)
|
||||||
!winrt: for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}"
|
!android:!winrt: for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}"
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ TARGET = ../tst_qapplication
|
|||||||
|
|
||||||
TESTDATA = ../test/test.pro ../tmp/README
|
TESTDATA = ../test/test.pro ../tmp/README
|
||||||
|
|
||||||
!winrt {
|
!android:!winrt {
|
||||||
SUBPROGRAMS = desktopsettingsaware modal
|
SUBPROGRAMS = desktopsettingsaware modal
|
||||||
win32:SUBPROGRAMS += wincmdline
|
win32:SUBPROGRAMS += wincmdline
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user