Qml tests using TestCase
-
@UniSuperBox said in Qml tests using TestCase:
Hmm... It's possible that you also need to set
QT_QPA_PLATFORM=xcb
either usingexport
or by putting it before your command.No, that is not the problem. Qt will select that automatically.
-
@Krille Ah, sorry. I forgot the extra option one needs to ensure color depth of the virtual display.
Try
xvfb-run -a -s '-screen 0 540x960x24' qmltestrunner
instead.Not sure why clickable didn't show you the error and exit, though. Maybe a bug in clickable?
-
Okay, so now I've tested:
clickable --arch="amd64" run "xfvb-run -a -s '-screen 0 540x960x24' qmltestrunner"
Leads me to:
bash: xfvb-run: command not found
Maybe we need to install xfvb in the container? Is there a way how I can install this in the container by myself?
-
Sorry...
xvfb
, notxfvb
. It stands for "X Virtual FrameBuffer." -
@Krille Sorry, was a typo. I've edited the post now. It's
xvfb-run
-
Haha okay. So now:
clickable --arch="amd64" run "xvfb-run -a -s '-screen 0 540x960x24' qmltestrunner"
And again the previous result: Nothing happens anymore I will try to run the command in the container to get an error report...
-
@Krille Hi. I don't know anything about what you are doing but my eyes see again xfvb above whereas it is spoken about xvfb. Just to be sure it's normal, i prefered to prevent you.
-
@domubpkm Oh, sure sorry. But nothing changes...
-
Btw I have found that this is propably the same reason why the UI tests (at least) in the messages app are still disabled: https://github.com/ubports/messaging-app/blob/xenial/tests/qml/CMakeLists.txt#L18
-
@Krille said in Qml tests using TestCase:
Btw I have found that this is propably the same reason why the UI tests (at least) in the messages app are still disabled: https://github.com/ubports/messaging-app/blob/xenial/tests/qml/CMakeLists.txt#L18
The tests aren't disabled. If
xvfb
is installed and tests are run, then these tests which depend on xvfb should be run too. If however, you are usingcrossbuilder
then the tests will not be run, because tests do not get run during the build then, as you cannot runarm
binaries native onx86
.