mirror of https://github.com/qt/qtbase.git
Android: auto-tests: Add missing lib to tst_qapplication Android apk
tst_qapplication is missing the modal_helper executable from the apk. Set the libmodal_helper.so as a target property for the tst_qapplication with QT_ANDROID_EXTRA_LIBS property. Change the name of qtbug_12673() test function to modalDialog(), I think this better represents what's being tested. The bug ticket representing qtbug_12673() can be found from the ticket linked to this commit. Construct a full path to the modal_helper.so and pass that to QProcess.start instead of relative path to filename when targeting Android. Add a shared utility function androidAbi() that returns the currently defined Android ABI. Change the function name in BLACKLIST file. Task-number: QTQAINFRA-6908 Pick-to: 6.8 6.9 6.10 Change-Id: I13904acda0f5608ea31df49bd95824e1412f2786 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
df69d25f5a
commit
04a97e21f5
|
@ -21,6 +21,9 @@ qt_internal_add_executable(apphelper_widgets
|
|||
Qt::Widgets
|
||||
)
|
||||
set_target_properties(apphelper_widgets PROPERTIES OUTPUT_NAME apphelper)
|
||||
set_target_properties(tst_qapplication PROPERTIES
|
||||
QT_ANDROID_EXTRA_LIBS ${CMAKE_CURRENT_BINARY_DIR}/libmodal_helper_${ANDROID_ABI}.so
|
||||
)
|
||||
|
||||
if(QT_FEATURE_library)
|
||||
qt_internal_add_cmake_library(apphelper_widgets_plugin
|
||||
|
|
|
@ -13,5 +13,5 @@ android
|
|||
android
|
||||
[wheelEventPropagation]
|
||||
android
|
||||
[qtbug_12673]
|
||||
[modalDialog]
|
||||
android
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include <private/qhighdpiscaling_p.h>
|
||||
|
||||
#include "../../../corelib/kernel/qcoreapplication/apphelper.h"
|
||||
#include "../../../../../shared/androidutils.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
@ -132,7 +133,7 @@ private slots:
|
|||
void wheelEventPropagation_data();
|
||||
void wheelEventPropagation();
|
||||
|
||||
void qtbug_12673();
|
||||
void modalDialog();
|
||||
void qtbug_103611();
|
||||
void noQuitOnHide();
|
||||
|
||||
|
@ -2434,12 +2435,24 @@ void tst_QApplication::wheelEventPropagation()
|
|||
}
|
||||
}
|
||||
|
||||
void tst_QApplication::qtbug_12673()
|
||||
QString modalHelperPath()
|
||||
{
|
||||
#ifdef Q_OS_ANDROID
|
||||
int argc = 1;
|
||||
QApplication app(argc, &argv0);
|
||||
return app.applicationDirPath() + QString("/libmodal_helper_%1.so").arg(androidAbi());
|
||||
#else
|
||||
return "./modal_helper";
|
||||
#endif
|
||||
}
|
||||
|
||||
// QTBUG-133037, QTBUG-12673
|
||||
void tst_QApplication::modalDialog()
|
||||
{
|
||||
#if QT_CONFIG(process)
|
||||
QProcess testProcess;
|
||||
QStringList arguments;
|
||||
testProcess.start("./modal_helper", arguments);
|
||||
testProcess.start(modalHelperPath(), arguments);
|
||||
QVERIFY2(testProcess.waitForStarted(),
|
||||
qPrintable(QString::fromLatin1("Cannot start 'modal_helper': %1").arg(testProcess.errorString())));
|
||||
QVERIFY(testProcess.waitForFinished(20000));
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (C) 2025 Intel Corporation.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
||||
|
||||
#include <QString>
|
||||
|
||||
inline QString androidAbi()
|
||||
{
|
||||
#if defined(__aarch64__)
|
||||
return "arm64-v8a";
|
||||
#elif defined(__arm__)
|
||||
return "armeabi-v7a";
|
||||
#elif defined(__i386__)
|
||||
return "x86";
|
||||
#elif defined(__x86_64__)
|
||||
return "x86_64";
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue