Run qtbase auto tests on HarmonyOS emulator
System Setup
macOS(Apple Silicon)
- DevEco Studio 26.0.0.851 installed at /Applications/DevEco-Studio.app
- Open a project, Device Manager, Create an emulator, MateBook Pro, HarmonyOS 7.0.0(26.0.0)
Host build and Target build steps are same as https://wiki.qt.io/Run_qtbase_auto_tests_on_HarmonyOS_devices .
Yeah, for running application in HarmonyOS emulator on macOS(Apple Silicon), you still need to sign the package.
Check connection
After you run the emulator,
$ /Applications/DevEco-Studio.app/Contents/sdk/default/openharmony/toolchains/hdc list targets
127.0.0.1:5555
Run auto tests
The HarmonyOS Emulator is still not mature enough, for tst_qrhi/tst_qvulkan/tst_qvulkanwidget, the emulator will crash, and even worse on macOS(Apple Silicon), it will also kill the system, then you need a reboot. You'd better to exclude those three tests for a full run.
Let's create a exclude.txt file:
tst_qrhi
tst_qvulkan
tst_qvulkanwidget
$ ctest -j 1 --output-on-failure --no-label-summary --exclude-from-file ./exclude.txt
Happy hacking!