lomiri.lomiri-ui-toolkit: Mark broken tests via patch

This commit is contained in:
OPNA2608 2023-11-25 12:31:02 +01:00
parent fab9e87bc8
commit 55af41414a
2 changed files with 160 additions and 90 deletions

View file

@ -0,0 +1,158 @@
From 243477a2bd6e315c77ebaf5b2ed4a9c9c4e1e22a Mon Sep 17 00:00:00 2001
From: OPNA2608 <christoph.neidahl@gmail.com>
Date: Sat, 25 Nov 2023 10:49:32 +0100
Subject: [PATCH] Mark problematic tests
- ShapeMaterial requires a Qt OpenGL context, doesn't work in our sandbox
- SignalSpy on QML shaders compilers don't see changes
- Scaling value from environment not picked up properly since Qt 5.15.11
https://gitlab.com/ubports/development/core/lomiri-ui-toolkit/-/issues/34
- TypeError on some properties with Qt 5.15
https://gitlab.com/ubports/development/core/lomiri-ui-toolkit/-/issues/9
---
tests/checkresults.sh | 89 ++++++++++++++++++++++++++++++++++++++++---
1 file changed, 83 insertions(+), 6 deletions(-)
diff --git a/tests/checkresults.sh b/tests/checkresults.sh
index fc498985e..730b9d406 100755
--- a/tests/checkresults.sh
+++ b/tests/checkresults.sh
@@ -22,6 +22,7 @@ ERRORS_PATTERN='<failure'
FAILURES=0
FATAL_WARNINGS=0
+EXCEPTED_FAILURES=0
EXCEPTED=0
for _XML in $*; do
_TESTNAME=$(basename $_XML | sed -r 's@(.+)\.xml@\1@' -)
@@ -31,7 +32,72 @@ for _XML in $*; do
exit 1
fi
- EXCEPTIONS='components_benchmark \
+ ERROR_EXCEPTIONS='\
+ tst_actionbar.13.qml \
+ tst_actionlist.13.qml \
+ tst_adaptivepagelayout.13.qml \
+ tst_adaptivepagelayout_configuration.13.qml \
+ tst_combobutton.11.qml \
+ tst_combobutton.13.qml \
+ tst_contextual_actions.13.qml \
+ tst_focus.13.qml \
+ tst_header.13.qml \
+ tst_hide_chrome.11.qml \
+ tst_listitem.12.qml \
+ tst_listitem.13.qml \
+ tst_listitem_actions_breaks_selectmode.12.qml \
+ tst_listitem_extras.13.qml \
+ tst_listitem_focus.13.qml \
+ tst_listitem_horizontal_navigation.13.qml \
+ tst_listitem_selectmode.12.qml \
+ tst_listitem_selectmode.13.qml \
+ tst_listitems_itemselector.11.qml \
+ tst_listitems_standard.11.qml \
+ tst_listitems_standard.13.qml \
+ tst_lomirilistview.11.qml \
+ tst_lomiritestcase.qml \
+ tst_multicolumnheader.13.qml \
+ tst_optionselector.11.qml \
+ tst_optionselector.13.qml \
+ tst_page_with_header.13.qml \
+ tst_pagehead_back_action.13.qml \
+ tst_pagehead_contents_width.13.qml \
+ tst_pagehead_sections.13.qml \
+ tst_pagehead_visible.13.qml \
+ tst_pageheader.13.qml \
+ tst_pagestack.13.qml \
+ tst_pagestack.DEPRECATED_APPHEADER_TABS.13.qml \
+ tst_picker.11.qml \
+ tst_picker.13.qml \
+ tst_popover.12.qml \
+ tst_popover.13.qml \
+ tst_popups_dialog.13.qml \
+ tst_popups_pagestack.13.qml \
+ tst_pulltorefresh_pagestack_topmargin.13.qml \
+ tst_slider.11.qml \
+ tst_slider.13.qml \
+ tst_switch_bug1510919.13.qml \
+ tst_tabs.11.qml \
+ tst_tabs.13.qml \
+ tst_tabs.DEPRECATED_TOOLBAR.11.qml \
+ tst_textarea.11.qml \
+ tst_textarea_in_flickable.11.qml \
+ tst_textfield.11.qml \
+ tst_textinput_common.12.qml \
+ tst_textinput_common.13.qml \
+ tst_toggles.13.qml \
+ inversemousearea \
+ layouts \
+ recreateview \
+ subtheming \
+ swipearea \
+ tst_icon.11.qml \
+ tst_icon.13.qml \
+ dpr1 \
+ '
+
+ EXCEPTIONS='\
+ components_benchmark \
tst_tabbar.11.qml \
tst_datepicker.bug1567840.SEGFAULT.12.qml \
tst_datepicker.bug1567840.SEGFAULT.13.qml \
@@ -49,22 +115,28 @@ for _XML in $*; do
inversemousearea \
tst_listitem_focus_bug.13.qml \
tst_shortcuts.13.qml \
+ tst_pagestack.DEPRECATED_TOOLBAR.11.qml \
'
WARNINGS=$(grep -c -P "$WARNINGS_PATTERN" $_XML)
ERRORS=$(grep -c -P "$ERRORS_PATTERN" $_XML)
if [ $ERRORS -ne 0 ]; then
- FAILURES_FILES="${FAILURES_FILES} ${_TESTNAME}\n"
- ((FAILURES+=$ERRORS))
+ if [[ $ERROR_EXCEPTIONS == *" $_TESTNAME "* ]]; then
+ EXCEPTED_FAILURES_FILES="${EXCEPTED_FAILURES_FILES} ${_TESTNAME}\n"
+ ((EXCEPTED_FAILURES+=$ERRORS))
+ else
+ FAILURES_FILES="${FAILURES_FILES} ${_TESTNAME}\n"
+ ((FAILURES+=$ERRORS))
+ fi
elif [ $WARNINGS -ne 0 ]; then
- if [[ $EXCEPTIONS == *$_TESTNAME* ]]; then
+ if [[ $EXCEPTIONS == *" $_TESTNAME "* ]]; then
EXCEPTED_FILES="${EXCEPTED_FILES} ${_TESTNAME}\n"
((EXCEPTED+=$WARNINGS))
else
FATAL_WARNINGS_FILES="${FATAL_WARNINGS_FILES} ${_TESTNAME}\n"
((FATAL_WARNINGS+=$WARNINGS))
fi
- elif [[ $EXCEPTIONS == *$_TESTNAME* ]]; then
+ elif [[ $ERROR_EXCEPTIONS == *" $_TESTNAME "* || $EXCEPTIONS == *" $_TESTNAME "* ]]; then
WOOT_FILES="${WOOT_FILES} ${_TESTNAME}\n"
fi
done
@@ -82,6 +154,11 @@ if [ -n "$FATAL_WARNINGS_FILES" ]; then
echo -e "$FATAL_WARNINGS_FILES"
fi
+if [ -n "$EXCEPTED_FAILURES_FILES" ]; then
+ echo The following tests issued $EXCEPTED_FAILURES expected failures:
+ echo -e "$EXCEPTED_FAILURES_FILES"
+fi
+
if [ -n "$EXCEPTED_FILES" ]; then
echo The following tests issued $EXCEPTED expected warnings:
echo -e "$EXCEPTED_FILES"
@@ -89,7 +166,7 @@ fi
if [ -n "$WOOT_FILES" ]; then
echo Woot! Known problematic tests passed!
- echo Consider removing these from EXCEPTIONS in ${0#$(pwd)/}!
+ echo Consider removing these from ERROR_EXCEPTIONS/EXCEPTIONS in ${0#$(pwd)/}!
echo -e "$WOOT_FILES"
fi
--
2.40.1

View file

@ -72,6 +72,8 @@ stdenv.mkDerivation (finalAttrs: {
url = "https://gitlab.com/ubports/development/core/lomiri-ui-toolkit/-/commit/4f999077dc6bc5591bdfede64fd21cb3acdcaac1.patch";
hash = "sha256-5VCQFOykxgspNBxH94XYuBpdHsH9a3+8FwV6xQE55Xc=";
})
./2001-Mark-problematic-tests.patch
];
postPatch = ''
@ -118,96 +120,6 @@ stdenv.mkDerivation (finalAttrs: {
tests/unit/visual/tst_icon.{11,13}.qml \
tests/unit/visual/tst_imageprovider.11.qml \
--replace '/usr/share' '${suru-icon-theme}/share'
# Disable tests
# These tests are detected via wildcard, so delete the actual files to disable them
for badQmlTest in ${lib.strings.concatStringsSep " " [
# Requires a working Qt OpenGL context in ShapeMaterial
"tst_actionbar.13.qml"
"tst_actionlist.13.qml"
"tst_adaptivepagelayout.13.qml"
"tst_adaptivepagelayout_configuration.13.qml"
"tst_combobutton.11.qml"
"tst_combobutton.13.qml"
"tst_contextual_actions.13.qml"
"tst_focus.13.qml"
"tst_header.13.qml"
"tst_hide_chrome.11.qml"
"tst_listitem.12.qml"
"tst_listitem.13.qml"
"tst_listitem_actions_breaks_selectmode.12.qml"
"tst_listitem_extras.13.qml"
"tst_listitem_focus.13.qml"
"tst_listitem_horizontal_navigation.13.qml"
"tst_listitem_selectmode.12.qml"
"tst_listitem_selectmode.13.qml"
"tst_listitems_itemselector.11.qml"
"tst_listitems_standard.11.qml"
"tst_listitems_standard.13.qml"
"tst_lomirilistview.11.qml"
"tst_lomiritestcase.qml"
"tst_multicolumnheader.13.qml"
"tst_optionselector.11.qml"
"tst_optionselector.13.qml"
"tst_page_with_header.13.qml"
"tst_pagehead_back_action.13.qml"
"tst_pagehead_contents_width.13.qml"
"tst_pagehead_sections.13.qml"
"tst_pagehead_visible.13.qml"
"tst_pageheader.13.qml"
"tst_pagestack.13.qml"
"tst_pagestack.DEPRECATED_APPHEADER_TABS.13.qml"
"tst_picker.11.qml"
"tst_picker.13.qml"
"tst_popover.12.qml"
"tst_popover.13.qml"
"tst_popups_dialog.13.qml"
"tst_popups_pagestack.13.qml"
"tst_pulltorefresh_pagestack_topmargin.13.qml"
"tst_slider.11.qml"
"tst_slider.13.qml"
"tst_switch_bug1510919.13.qml"
"tst_tabs.11.qml"
"tst_tabs.13.qml"
"tst_tabs.DEPRECATED_TOOLBAR.11.qml"
"tst_textarea.11.qml"
"tst_textarea_in_flickable.11.qml"
"tst_textfield.11.qml"
"tst_textinput_common.12.qml"
"tst_textinput_common.13.qml"
"tst_toggles.13.qml"
# SignalSpy on QML shader compilers are failing for unknown reasons
"tst_icon.11.qml"
"tst_icon.13.qml"
]}; do
find tests/unit -name $badQmlTest -delete
done
# These tests are registered explicitly, just removing them from the list is enough
for badUnitTest in ${lib.strings.concatStringsSep " " [
# Requires a working Qt OpenGL context in ShapeMaterial
"inversemousearea"
"layouts"
"recreateview"
"subtheming"
"swipearea"
# Intended scaling value gets overridden since Qt 5.15.11
"dpr1"
]}; do
sed -i -e "/$badUnitTest/d" tests/unit/unit.pro tests/unit/units/units.pro
done
# These tests don't fail explicitly, but issue warnings that the test suite doesn't expect, which it turns into errors
for unexpectedWarningTest in ${lib.strings.concatStringsSep "" [
# qml/Lomiri/Components/1.2/Toolbar.qml:96: TypeError: Cannot read property 'locked' of null
# I don't know QML enough to fix this, tracked upstream at https://gitlab.com/ubports/development/core/lomiri-ui-toolkit/-/issues/9
"tst_pagestack.DEPRECATED_TOOLBAR.11.qml"
]}; do
sed -i -e "/EXCEPTIONS=/a '$unexpectedWarningTest' \\" tests/checkresults.sh
done
'';
# With strictDeps, QMake only picks up Qt dependencies from nativeBuildInputs