Closed peat-psuwit closed 2 years ago
Maybe it's Focal only, but without this CMake projects fails to run QML tests. For example, on the main branch of lomiri-system-settings
, with --lxd-image=ubuntu:20.04
:
dh_auto_test
cd obj-x86_64-linux-gnu && make -j17 test ARGS\+=-j17
make[2]: Entering directory '/home/peat/lomiri-system-settings/obj-x86_64-linux-gnu'
Running tests...
/usr/bin/ctest --force-new-ctest-process -j17
Test project /home/peat/lomiri-system-settings/obj-x86_64-linux-gnu
Start 1: tst-plugins
Start 2: tst-arguments
Start 3: tst-systemimage
Start 4: testmouse
Start 5: testOtherNetwork
Start 6: testMainWindow
Start 7: testLauncherPageComponent
Start 8: tst-bluetooth
Start 9: tst-bluetooth-devicemodel
Start 10: tst-bluetooth-device
Start 11: tst-wifidbushelper
Start 12: tst_notifications
1/12 Test #2: tst-arguments .................... Passed 0.02 sec
2/12 Test #1: tst-plugins ...................... Passed 0.08 sec
3/12 Test #6: testMainWindow ...................***Failed 0.13 sec
qmltestrunner: could not exec '/usr/local/bin/qmltestrunner': No such file or directory
4/12 Test #7: testLauncherPageComponent ........***Failed 0.13 sec
qmltestrunner: could not exec '/usr/local/bin/qmltestrunner': No such file or directory
5/12 Test #4: testmouse ........................***Failed 0.15 sec
qmltestrunner: could not exec '/usr/local/bin/qmltestrunner': No such file or directory
6/12 Test #11: tst-wifidbushelper ............... Passed 0.28 sec
7/12 Test #5: testOtherNetwork .................***Failed 2.07 sec
qmltestrunner: could not exec '/usr/local/bin/qmltestrunner': No such file or directory
8/12 Test #3: tst-systemimage .................. Passed 2.31 sec
9/12 Test #9: tst-bluetooth-devicemodel ........ Passed 3.03 sec
10/12 Test #12: tst_notifications ................ Passed 3.35 sec
11/12 Test #8: tst-bluetooth .................... Passed 9.13 sec
12/12 Test #10: tst-bluetooth-device ............. Passed 13.17 sec
67% tests passed, 4 tests failed out of 12
Total Test time (real) = 13.28 sec
The following tests FAILED:
4 - testmouse (Failed)
5 - testOtherNetwork (Failed)
6 - testMainWindow (Failed)
7 - testLauncherPageComponent (Failed)
Errors while running CTest
Maybe it's Focal only, but without this CMake projects fails to run QML tests. For example, on the main branch of
lomiri-system-settings
, with--lxd-image=ubuntu:20.04
:
Mmm... I see. It may be that this is a similar issue to what I met before, and for which I added this code: https://github.com/ubports/crossbuilder/blob/master/crossbuilder#L684-L689
Let's merge this; I'll give it a try on xenial, and if it turns out it works, then I'll remove the block I linked above.
Let's merge this; I'll give it a try on xenial, and if it turns out it works, then I'll remove the block I linked above.
Your changes work in xenial too, but the block doing the symlinks seems to be still necessary: I tested the fm-radio-service (which uses cmake) on xenial arm64, and it fails without it. So, let's keep things are they are now.
While the /usr/local/bin trick works for crossbuilding, unfortunately it breaks running tests for native builds. Since it's not needed for native builds anyway, let's skip it there.