Commit graph

113 commits

Author SHA1 Message Date
Markus Greiner
bd492542cc fix(linux): issues when running ./build.sh test:linux, improving ibus-daemon stop after review
Test-bot: skip
2026-01-15 11:09:20 +01:00
Markus Greiner
8009bc7959
Update linux/ibus-keyman/tests/scripts/test-helper.inc.sh
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-01-15 10:20:49 +01:00
Markus Greiner
60db18681e fix(linux): issues when running ./build.sh test:linux 2026-01-14 22:35:00 +01:00
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
Eberhard Beilharz
65f2e354eb
maint(linux): suppress output of stopping processes after test run
This change suppresses the output of ending the processes started for
the test run. The output doesn't help much but clutters the overall
output and shows up as warnings on TC.
2025-10-06 16:13:44 +02:00
Eberhard Beilharz
6c2237d800
Merge pull request #14817 from keymanapp/maint/linux/13887_integrtests
maint(linux): fix integration tests in Docker

This PR allows the integration tests to work when running them in a Docker container. Also fixes things when running on TC's Ubuntu 24.04 Noble build agent, and improves the behavior when running directly on a developer's machine (previously typing stopped working after the tests...).

Also fixes building mcompile in a Docker container.

Fixes: #13887
2025-10-06 12:01:38 +02:00
Eberhard Beilharz
4f38d527b4
Apply suggestions from code review
Co-authored-by: Markus Greiner <90342882+Markus-SWAG@users.noreply.github.com>
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-09-30 11:01:31 +02:00
Eberhard Beilharz
167ec33d54
chore(linux): Merge remote-tracking branch 'origin/master' into maint/linux/remotedbgdocker 2025-09-30 08:29:02 +02:00
Eberhard Beilharz
4d477d4a64
docs(linux): update comment 2025-09-26 17:50:49 +02:00
Eberhard Beilharz
e0e4276fb3
maint(linux): improve running integration tests on developer's machine
This improves running the integration tests on a developer's machine.
While the tests did run fine it was no longer possible to type after
running the tests. The reason was that starting the `ibus-daemon` for
testing together with `mutter` replaced some processes that belonged to
the `ibus-daemon` of the session.

This change now checks if ibus is still functional after killing the
testing `ibus-daemon` (by checking the current engine with `ibus engine`).
Otherwise it kills the lonely remaining `ibus-daemon` and restarts `ibus`.

Test-bot: skip
2025-09-25 19:34:22 +02:00
Eberhard Beilharz
e0d0a4d4c1
maint(linux): fix running integration tests in Docker
Fixes: #13887
Test-bot: skip
2025-09-25 19:32:29 +02:00
Eberhard Beilharz
db3cd5092d
maint(linux): remove several shellcheck directives and warnings
This change improves our `.shellcheckrc` file so that several directives
are no longer needed and source files are still found. Also remove some
directives that are no longer necessary, either because the changes to
`.shellcheckrc` makes them obsolete, or because the lines changed so
that they no longer contain the problem.

Also remove some shellcheck warnings.

Build-bot: skip
Test-bot: skip
2025-09-23 18:30:16 +02:00
Eberhard Beilharz
23f8c59c07
maint(linux): allow to remote debug integration tests in Docker
This adds a `--remote-debug` option to `resources/docker-images/run.sh`.
If specified the container will expose `localhost:2345` for remote
debugging inside of the container.

This is useful for debugging integration tests in the container.

Build-bot: skip
Test-bot: skip
2025-09-23 18:20:32 +02:00
Eberhard Beilharz
b2046e065a
refactor(linux): remove shellcheck warnings
Build-bot: skip
Test-bot: skip
2025-09-19 18:41:26 +02:00
Eberhard Beilharz
8e64a2ad75
Merge pull request #14403 from keymanapp/fix/linux/stoptestserver
maint(linux): fix stopping of test server
2025-07-29 11:34:21 +02:00
Eberhard Beilharz
08746e24a2
refactor(linux): remove shellcheck warnings
Test-bot: skip
2025-07-25 19:54:25 +02:00
Eberhard Beilharz
183a8455b0
maint(linux): fix stopping of test server 2025-07-25 15:53:15 +02:00
Eberhard Beilharz
d0d774f72c
refactor(linux): move defines to common header files
Fixes: #13281
Test-bot: skip
2025-07-17 19:41:26 +02:00
Eberhard Beilharz
ca96a8c38d
chore(linux): address code review comments 2025-02-19 10:59:44 +01:00
Eberhard Beilharz
0c2d8f0312
refactor(linux): changes to get integration tests working
This change contains various changes and refactorings which together
allows the integration tests to pass again.

One of the important changs is `DbusTestHelper` which listens to a DBus
signal for a sentinel message and then simulates the sentinel key press.
Getting this to work also requires processing sd-bus messages which hooks
into the glib event loop and is implemented in `EventSource`.

Fixes: #13204
2025-02-14 17:30:42 +01:00
Eberhard Beilharz
44eb85f433
chore(linux): Revert "refactor(linux): temporarily ignore integration tests"
This reverts commit 3a72e56c75.
2025-02-14 16:42:07 +01:00
Eberhard Beilharz
84df966c38
refactor(linux): cleanup code of test fixture 2025-02-14 16:35:06 +01:00
Eberhard Beilharz
937f799d23
chore(linux): update message when running tests 2025-02-14 16:34:27 +01:00
Eberhard Beilharz
af99c1d668
chore(linux): improve the output if dependencies are missing 2025-02-14 16:31:12 +01:00
Eberhard Beilharz
051e6c7b1b
feat(linux): add --remote-debug flag to run-tests.sh script
This allows to run the tests in a VM and debug them remotely.

Co-authored-by: Darcy Wong <darcy_wong@sil.org>
2025-02-14 16:29:41 +01:00
Eberhard Beilharz
b1c818338f
refactor(linux): address code review comments 2025-02-06 16:57:52 +01:00
Eberhard Beilharz
3a72e56c75
refactor(linux): temporarily ignore integration tests
The setup for the integration tests is still wrong, so ignoring them
allows us to start the users tests and move forward. The integration
tests will be fixed in a follow-up commit.
2025-02-05 11:47:58 +01:00
Eberhard Beilharz
ec0ca04805
refactor(linux): Implement ordered output without patched ibus
This change implements things on the ibus-keyman side.

Fixes: #10799
2025-02-05 11:42:05 +01:00
Eberhard Beilharz
00a00f6dda
chore(linux): preserve log files when running tests under Docker
This change copies the log files that get created during a test run to
the `build/docker-linux/tmp` directory. Also fixes a bug when not
running in docker. Also create log file for test server.
2025-01-31 16:14:41 +01:00
Eberhard Beilharz
80ae8e6289
chore(linux): improve compatibility with Gentoo Linux 🍒
Gentoo doesn't use systemd. `libelogind` or `basu` implement some aspects
of systemd, so we use that on Gentoo (or rather when `libsystemd` is not
available but `libelogind` or `basu` is).

Patch from https://forums.gentoo.org/viewtopic.php?p=8850566.
See also https://community.software.sil.org/t/keyman-for-gentoo-linux/9615.

Cherry-pick-of: #12889
2025-01-29 09:18:22 +01:00
Eberhard Beilharz
5090aeefd9
fix(linux): improve test script
This changes the test script: when running in Docker it doesn't make
sense to restart ibus when exiting the tests. This works around a
problem where the `ibus start` command would hang.
2025-01-24 10:43:31 +01:00
Eberhard Beilharz
248f01f1e3
chore(linux): change SIL International to SIL Global 2024-12-10 10:26:44 +01:00
Marc Durdin
ffae5bab1c chore(core): typo in meson 2024-11-28 11:56:50 +07:00
Marc Durdin
faf479c105 chore(linux): include common test source files 2024-11-28 10:54:01 +07:00
Eberhard Beilharz
bcc09b78c8
chore(linux): use shared meson config
Fixes: #8406
2024-06-24 19:08:12 +02:00
Eberhard Beilharz
d93fb6aa0b
refactor(linux): rename methods that deal with keyboard options
This renames the existing methods that read and write keyboard options
so that it's visible from the name that they read/write keyboard options.
This is in preparation of new methods that read and write more general
options.
2024-06-21 18:22:29 +02:00
Eberhard Beilharz
1e67022a44
change(linux): restart ibus only when manually running tests
If we try to restart ibus when we run the tests as part of a build we
run into a timeout in the test teardown.
2024-06-14 15:37:43 +02:00
Eberhard Beilharz
407cfa8f33
chore(linux): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2024-06-14 15:09:13 +02:00
Eberhard Beilharz
b93c459515
fix(linux): restart ibus after manual integration test run
Previously keyboard input was no longer input after manually running
the integration tests. This change fixes this by restarting ibus after
the tests. However, we only want to do that if the ibus instance we
started for the tests got killed. The cleanup script might get called
multiple times, so we need this check.
2024-06-13 17:50:41 +02:00
Eberhard Beilharz
6b5b44eddd
fix(linux): Fix packaging on Ubuntu and Debian servers
When building packages warnings are treated as errors. When building on
Ubuntu and Debian servers we don't have a patched ibus version but still
want to build the packages. So this change outputs a message instead of
a warning when building packages.
2024-01-29 17:50:04 +01:00
rc-swag
aef718c56b fix(core): update linux test load_source call 2023-12-15 14:05:37 +10:00
Eberhard Beilharz
604fbc1a75
chore(linux): Rename namespace kbp to core 2023-10-19 10:39:55 +02:00
Eberhard Beilharz
52bb859817
chore(linux): Rename (lib)kmnkbp to (lib)keymancore 2023-10-19 10:35:09 +02:00
Eberhard Beilharz
7340c6be1f
chore(linux): Improve process check 2023-10-10 15:52:52 +02:00
Eberhard Beilharz
2356a39efa
chore(linux): Add testname to log file 2023-10-10 15:52:52 +02:00
Eberhard Beilharz
22126a0eef
refactor(linux): Use auto cleanup 2023-10-10 15:52:51 +02:00
Marc Durdin
db76e2541d chore: rename KM_KBP_ to KM_CORE_ 2023-10-09 14:53:22 +07:00
Marc Durdin
4ef18f5e29 chore(core): rename keyboardprocessor.h to keyman_core_api.h
Fixes #9721.

Also tweaks some documentation references to keyboardprocessor, but does
not touch those relating to debian/control.
2023-10-09 14:21:01 +07:00
Eberhard Beilharz
43ae210494
chore(linux): Fix run-tests.sh script
This passes the new parameter to the `setup` call which got introduced in
a previous PR.
2023-09-27 12:58:00 +02:00
Eberhard Beilharz
650c04d21c
chore(linux): Dynamically choose display number
This improves reliability if some processes are still running from a
previous run, which previously caused the tests to fail.

Also in the case of failed processes, list which ones are missing.
2023-09-26 18:09:13 +02:00