diff options
author | Kimmo Ollila <[email protected]> | 2022-02-22 11:47:55 +0200 |
---|---|---|
committer | Kimmo Ollila <[email protected]> | 2022-03-03 08:26:06 +0200 |
commit | 0fc8a511baa6493c8d80046dd99b8eba3634d2a2 (patch) | |
tree | 977381e3c194c662e17960be338f639af19bb7e4 | |
parent | 5e38c5c1e0a20e8421126f33abc3fae56e7553c7 (diff) |
INTEGRITY: Fix some test cases from core/qml folders
-Add dummy_imports.qml to TESTDATA
-Let qmlimportscanner handle plugin import
-Skip cases that depend on mounted filesystem
Task-number: QTBUG-99123
Pick-to: 6.3 6.2
Change-Id: I99e21e423f2114c4c4ee1e24bdf9bb85af51baf7
Reviewed-by: Alexandru Croitor <[email protected]>
Reviewed-by: Tatiana Borisova <[email protected]>
Reviewed-by: Alexey Edelev <[email protected]>
22 files changed, 88 insertions, 4 deletions
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp index aa81b0e180..4c8289dd22 100644 --- a/src/qmltest/quicktest.cpp +++ b/src/qmltest/quicktest.cpp @@ -436,7 +436,7 @@ int quick_test_main_with_setup(int argc, char **argv, const char *name, const ch testPath = s; } -#if defined(Q_OS_ANDROID) +#if defined(Q_OS_ANDROID) || defined(Q_OS_INTEGRITY) if (testPath.isEmpty()) testPath = QLatin1String(":/"); #endif diff --git a/tests/auto/core/CMakeLists.txt b/tests/auto/core/CMakeLists.txt index 31413de9c4..a57498db91 100644 --- a/tests/auto/core/CMakeLists.txt +++ b/tests/auto/core/CMakeLists.txt @@ -14,3 +14,7 @@ qt_internal_add_test(tst_core Qt::Qml TESTDATA ${test_data} ) + +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_core) +endif() diff --git a/tests/auto/qml/CMakeLists.txt b/tests/auto/qml/CMakeLists.txt index caddfd2fe8..fd587e93a6 100644 --- a/tests/auto/qml/CMakeLists.txt +++ b/tests/auto/qml/CMakeLists.txt @@ -32,7 +32,12 @@ add_subdirectory(qtqmlmodules) add_subdirectory(qquickfolderlistmodel) add_subdirectory(qqmlapplicationengine) add_subdirectory(qqmlsettings) -add_subdirectory(qmldiskcache) + +if(NOT INTEGRITY) +# There's no mounted filesystem on INTEGRITY therefore skipping qmldiskcache + add_subdirectory(qmldiskcache) +endif() + add_subdirectory(qqmlmetatype) if(TARGET Qt::Quick) add_subdirectory(qmltc_manual) diff --git a/tests/auto/qml/parserstress/CMakeLists.txt b/tests/auto/qml/parserstress/CMakeLists.txt index 2d2f3df4c3..4505dab1da 100644 --- a/tests/auto/qml/parserstress/CMakeLists.txt +++ b/tests/auto/qml/parserstress/CMakeLists.txt @@ -18,8 +18,12 @@ qt_internal_add_test(tst_parserstress Qt::Gui Qt::GuiPrivate Qt::QmlPrivate - TESTDATA ${test_data} + TESTDATA ${test_data} "dummy_imports.qml" ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_parserstress) +endif() + ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qjsengine/CMakeLists.txt b/tests/auto/qml/qjsengine/CMakeLists.txt index 6dc74b8858..3e8939a546 100644 --- a/tests/auto/qml/qjsengine/CMakeLists.txt +++ b/tests/auto/qml/qjsengine/CMakeLists.txt @@ -27,7 +27,7 @@ qt_internal_add_test(tst_qjsengine Qt::QmlPrivate LIBRARIES # special case Threads::Threads # special case - TESTDATA ${test_data} + TESTDATA ${test_data} "dummy_imports.qml" ) # Resources: @@ -61,6 +61,10 @@ qt_internal_add_resource(tst_qjsengine "qmake_immediate" ${qmake_immediate_resource_files} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qjsengine) +endif() + ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qjsmanagedvalue/CMakeLists.txt b/tests/auto/qml/qjsmanagedvalue/CMakeLists.txt index 3e466d8e2e..2449b9a320 100644 --- a/tests/auto/qml/qjsmanagedvalue/CMakeLists.txt +++ b/tests/auto/qml/qjsmanagedvalue/CMakeLists.txt @@ -10,7 +10,12 @@ qt_internal_add_test(tst_qjsmanagedvalue PUBLIC_LIBRARIES Qt::Qml Qt::QmlPrivate + TESTDATA "dummy_imports.qml" ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qjsmanagedvalue) +endif() + ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qjsvalue/CMakeLists.txt b/tests/auto/qml/qjsvalue/CMakeLists.txt index bb00f3221a..b8ee79713c 100644 --- a/tests/auto/qml/qjsvalue/CMakeLists.txt +++ b/tests/auto/qml/qjsvalue/CMakeLists.txt @@ -22,7 +22,12 @@ qt_internal_add_test(tst_qjsvalue Qt::Widgets LIBRARIES # special case Threads::Threads # special case + TESTDATA "dummy_imports.qml" ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qjsvalue) +endif() + ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qqmlapplicationengine/CMakeLists.txt b/tests/auto/qml/qqmlapplicationengine/CMakeLists.txt index 7f05a759b6..d9fbf6517d 100644 --- a/tests/auto/qml/qqmlapplicationengine/CMakeLists.txt +++ b/tests/auto/qml/qqmlapplicationengine/CMakeLists.txt @@ -35,6 +35,9 @@ qt_internal_add_resource(tst_qqmlapplicationengine "tst_qqmlapplicationengine" ${tst_qqmlapplicationengine_resource_files} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qqmlapplicationengine) +endif() #### Keys ignored in scope 2:.:.:tst_qqmlapplicationengine.pro:<TRUE>: # TRANSLATIONS = "data/i18n/qml_ja.ts" diff --git a/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp b/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp index 67c75ccce7..c948ad5b9c 100644 --- a/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp +++ b/tests/auto/qml/qqmlapplicationengine/tst_qqmlapplicationengine.cpp @@ -101,6 +101,10 @@ void tst_qqmlapplicationengine::basicLoading() // will break. void tst_qqmlapplicationengine::testNonResolvedPath() { +#if defined(Q_OS_INTEGRITY) + QSKIP("INTEGRITY stores QML files in resources, and the path to a resource cannot be relative in this case"); +#endif + #ifdef Q_OS_ANDROID QSKIP("Android stores QML files in resources, and the path to a resource cannot be relative in this case"); #endif diff --git a/tests/auto/qml/qqmlconsole/CMakeLists.txt b/tests/auto/qml/qqmlconsole/CMakeLists.txt index 171d1ad578..5096503c15 100644 --- a/tests/auto/qml/qqmlconsole/CMakeLists.txt +++ b/tests/auto/qml/qqmlconsole/CMakeLists.txt @@ -21,6 +21,10 @@ qt_internal_add_test(tst_qqmlconsole TESTDATA ${test_data} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qqmlconsole) +endif() + ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qqmlengine/CMakeLists.txt b/tests/auto/qml/qqmlengine/CMakeLists.txt index 01e9999f79..43fec7cb90 100644 --- a/tests/auto/qml/qqmlengine/CMakeLists.txt +++ b/tests/auto/qml/qqmlengine/CMakeLists.txt @@ -36,6 +36,9 @@ qt_internal_add_resource(tst_qqmlengine "qmake_immediate" ${qmake_immediate_resource_files} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qqmlengine) +endif() ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qqmlfileselector/CMakeLists.txt b/tests/auto/qml/qqmlfileselector/CMakeLists.txt index d010280a9d..4d7c4f840b 100644 --- a/tests/auto/qml/qqmlfileselector/CMakeLists.txt +++ b/tests/auto/qml/qqmlfileselector/CMakeLists.txt @@ -22,6 +22,10 @@ qt_internal_add_test(tst_qqmlfileselector TESTDATA ${test_data} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qqmlfileselector) +endif() + ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qqmlincubator/CMakeLists.txt b/tests/auto/qml/qqmlincubator/CMakeLists.txt index 934199a66e..b2ade30c39 100644 --- a/tests/auto/qml/qqmlincubator/CMakeLists.txt +++ b/tests/auto/qml/qqmlincubator/CMakeLists.txt @@ -24,6 +24,10 @@ qt_internal_add_test(tst_qqmlincubator TESTDATA ${test_data} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qqmlincubator) +endif() + ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qqmlinfo/CMakeLists.txt b/tests/auto/qml/qqmlinfo/CMakeLists.txt index 9ba8ca4c4c..3020b84c59 100644 --- a/tests/auto/qml/qqmlinfo/CMakeLists.txt +++ b/tests/auto/qml/qqmlinfo/CMakeLists.txt @@ -23,6 +23,10 @@ qt_internal_add_test(tst_qqmlinfo TESTDATA ${test_data} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qqmlinfo) +endif() + #### Keys ignored in scope 1:.:.:qqmlinfo.pro:<TRUE>: # QML_IMPORT_MAJOR_VERSION = "1" # QML_IMPORT_NAME = "org.qtproject.Test" diff --git a/tests/auto/qml/qqmllistreference/CMakeLists.txt b/tests/auto/qml/qqmllistreference/CMakeLists.txt index b620873c54..9d4b3cac7a 100644 --- a/tests/auto/qml/qqmllistreference/CMakeLists.txt +++ b/tests/auto/qml/qqmllistreference/CMakeLists.txt @@ -23,6 +23,10 @@ qt_internal_add_test(tst_qqmllistreference TESTDATA ${test_data} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qqmllistreference) +endif() + ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qqmlmetaobject/CMakeLists.txt b/tests/auto/qml/qqmlmetaobject/CMakeLists.txt index a46b58f9ab..93edb03527 100644 --- a/tests/auto/qml/qqmlmetaobject/CMakeLists.txt +++ b/tests/auto/qml/qqmlmetaobject/CMakeLists.txt @@ -21,6 +21,10 @@ qt_internal_add_test(tst_qqmlmetaobject TESTDATA ${test_data} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qqmlmetaobject) +endif() + ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qqmlmetatype/CMakeLists.txt b/tests/auto/qml/qqmlmetatype/CMakeLists.txt index 86b1fa6afb..74146bb49b 100644 --- a/tests/auto/qml/qqmlmetatype/CMakeLists.txt +++ b/tests/auto/qml/qqmlmetatype/CMakeLists.txt @@ -46,6 +46,9 @@ qt_internal_add_resource(tst_qqmlmetatype "qmake_qmldirresource" ${qmake_qmldirresource_resource_files} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qqmlmetatype) +endif() ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qqmlnotifier/CMakeLists.txt b/tests/auto/qml/qqmlnotifier/CMakeLists.txt index dfd9d625bc..4056f06458 100644 --- a/tests/auto/qml/qqmlnotifier/CMakeLists.txt +++ b/tests/auto/qml/qqmlnotifier/CMakeLists.txt @@ -20,6 +20,10 @@ qt_internal_add_test(tst_qqmlnotifier TESTDATA ${test_data} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qqmlnotifier) +endif() + ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qqmlpromise/CMakeLists.txt b/tests/auto/qml/qqmlpromise/CMakeLists.txt index 00c3dcf6b4..ac0ffebabe 100644 --- a/tests/auto/qml/qqmlpromise/CMakeLists.txt +++ b/tests/auto/qml/qqmlpromise/CMakeLists.txt @@ -24,6 +24,10 @@ qt_internal_add_test(tst_qqmlpromise TESTDATA ${test_data} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qqmlpromise) +endif() + #### Keys ignored in scope 1:.:.:qqmlpromise.pro:<TRUE>: # DISTFILES = "data/then-fulfilled-non-callable.qml" "data/then-reject-non-callable.qml" "data/then-resolve-multiple-then.qml" "data/then-resolve-chaining.qml" "data/then-reject-chaining.qml" "data/promise-resolve-with-value.qml" "data/promise-resolve-with-promise.qml" "data/promise-reject-with-value.qml" "data/promise-executor-resolve.qml" "data/promise-get-length.qml" "data/promise-executor-reject.qml" "data/promise-reject-catch.qml" "data/promise-async-resolve-with-value.qml" "data/promise-async-reject-with-value.qml" "data/promise-all-resolve.qml" "data/promise-all-empty-input.qml" "data/promise-resolve-with-array.qml" "data/promise-all-reject-reject-is-last.qml" "data/promise-all-reject-reject-is-mid.qml" "data/promise-race-resolve-1st.qml" "data/promise-race-empty-input.qml" "data/promise-race-resolve-2nd.qml" "data/promise-race-resolve-1st-in-executor-function.qml" "data/promise-resolve-is-a-function.qml" "data/promise-resolve-function-length.qml" "data/promise-all-invoke-then-method.qml" "data/promise-resolve-with-empty.qml" "data/promise-executor-throw-exception.qml" "data/promise-executor-function-extensible.qml" "data/promise-all-noniterable-input.qml" # OTHER_FILES = <EMPTY> diff --git a/tests/auto/qml/qqmlxmlhttprequest/CMakeLists.txt b/tests/auto/qml/qqmlxmlhttprequest/CMakeLists.txt index 19450aaef7..ea244fcbe4 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/CMakeLists.txt +++ b/tests/auto/qml/qqmlxmlhttprequest/CMakeLists.txt @@ -23,6 +23,10 @@ qt_internal_add_test(tst_qqmlxmlhttprequest TESTDATA ${test_data} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qqmlxmlhttprequest) +endif() + ## Scopes: ##################################################################### diff --git a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp index 3353d8d5e1..d1dcf3829a 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp +++ b/tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp @@ -1093,6 +1093,10 @@ static const QString testString = QStringLiteral("Test-String"); void tst_qqmlxmlhttprequest::doFileRequest(std::function<void(QObject *component, QTemporaryFile &writeFile)> verifyFunction) { +#if defined(Q_OS_INTEGRITY) + QSKIP("There's no mounted filesystem on INTEGRITY."); +#endif + // Create test files QTemporaryFile writeFile; QTemporaryFile readFile; diff --git a/tests/auto/qml/qtqmlmodules/CMakeLists.txt b/tests/auto/qml/qtqmlmodules/CMakeLists.txt index 2bff111bc7..6ff0cc01ae 100644 --- a/tests/auto/qml/qtqmlmodules/CMakeLists.txt +++ b/tests/auto/qml/qtqmlmodules/CMakeLists.txt @@ -22,6 +22,10 @@ qt_internal_add_test(tst_qtqmlmodules TESTDATA ${test_data} ) +if(QT_BUILD_STANDALONE_TESTS) + qt_import_qml_plugins(tst_qtqmlmodules) +endif() + ## Scopes: ##################################################################### |