spiegel-keyman/linux/ibus-keyman/tests
Eberhard Beilharz 69950055e2
fix(linux): fix persisting options
This change adds the verification of the options to the baseline tests
and fixes persisting the options. Previously we treated the UTF-16 key
and value as UTF-8 so that only the first character got persisted.

Test-bot: skip
2025-12-17 19:06:34 +01:00
..
dbus-test-server maint(linux): fix stopping of test server 2025-07-25 15:53:15 +02:00
scripts maint(linux): suppress output of stopping processes after test run 2025-10-06 16:13:44 +02:00
DbusTestHelper.cpp refactor(linux): move defines to common header files 2025-07-17 19:41:26 +02:00
DbusTestHelper.h refactor(linux): changes to get integration tests working 2025-02-14 17:30:42 +01:00
EventSource.cpp refactor(linux): changes to get integration tests working 2025-02-14 17:30:42 +01:00
EventSource.h refactor(linux): changes to get integration tests working 2025-02-14 17:30:42 +01:00
ibusimcontext.c refactor(linux): changes to get integration tests working 2025-02-14 17:30:42 +01:00
ibusimcontext.h chore(linux): change SIL International to SIL Global 2024-12-10 10:26:44 +01:00
KeyHandling.cpp refactor(linux): changes to get integration tests working 2025-02-14 17:30:42 +01:00
KeyHandling.h refactor(linux): changes to get integration tests working 2025-02-14 17:30:42 +01:00
meson.build maint(linux): fix running integration tests in Docker 2025-09-25 19:32:29 +02:00
README.md Apply suggestions from code review 2025-09-30 11:01:31 +02:00
testfixture.cpp fix(linux): fix persisting options 2025-12-17 19:06:34 +01:00
testfixture.h refactor(linux): move defines to common header files 2025-07-17 19:41:26 +02:00
testmodule.c chore(linux): Fix warnings 2023-01-26 16:58:27 +01:00
testmodule.h chore(linux): Fix warnings 2023-01-26 16:58:27 +01:00

ibus-keyman integration tests

The ibus-keyman integration tests run the tests defined in common/test/keyboards/baseline. The tests run in a separate Xephyr session. Any dconf settings that have to be set during the tests are stored in ~/.config/glib-2.0/settings/keyfile.

Running tests

The tests get run as part of building ibus-keyman, more specifically when running build.sh test.

Run all tests

All tests can be run with the test script:

scripts/run-tests.sh

Run specific tests

To run a single test you pass the testname (as found in common/test/keyboards/baseline). Multiple tests should be separated by space.

scripts/run-tests.sh -- k_000___null_keyboard k_005___nul_with_initial_context

Debugging tests

This is most easily done by running the tests in a VM and then remote debugging into the VM. The VM should be the same Linux version as the host, and the Keyman repo should be shared with the VM through a shared folder.

Then you can start the run-tests.sh script on the VM with the --remote-debug option. This will start the background services and then start a GDB session waiting for the debugger to connect.

For example:

linux/ibus-keyman/tests/scripts/run-tests.sh --remote-debug \
  --no-surrounding-text --no-wayland -- k_001___basic_input_unicodei

On the host, you can then attach to the VM. See the Attach to gdbserver (ibus-keyman integration tests) configuration in docs/settings/linux/launch.json for a sample configuration in vscode. You'll have to adjust the IP address to match the VM which the run-tests.sh script will output.

Manually running tests in TeamCity

To run the tests manually in TeamCity, you'll have to set an environment variable TEAMCITY_GIT_PATH (the actual value doesn't matter):

export TEAMCITY_GIT_PATH=/something