Commit graph

51 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
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
08746e24a2
refactor(linux): remove shellcheck warnings
Test-bot: skip
2025-07-25 19:54:25 +02: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
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
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
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
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
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
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
Eberhard Beilharz
4ecaad6ef1
chore(linux): Address code review comments 2023-09-26 13:04:33 +02:00
Eberhard Beilharz
1b5a86607d
chore(linux): Check that background processes are still running
Before we run a test we now check that ibus and the other processes
we need are still running. If not we run test setup again.

Maybe fix #9570.
2023-09-25 18:55:54 +02:00
Eberhard Beilharz
90627428c4
chore(linux): Debug test failures
This no longer suppresses the output of cleanup.
2023-09-21 18:55:28 +02:00
Eberhard Beilharz
4e4a1215ce
chore(linux): Fix bug in ibus-keyman run-tests.sh script 2023-09-21 18:55:27 +02:00
Eberhard Beilharz
c616be6bf1
refactor(linux): Move common code to included file 2023-07-19 17:39:34 +02:00
Eberhard Beilharz
6622c70fd2
chore(linux): Fix running tests with Wayland
Because we passed in a wrong parameter (`--wayland`) but checked for
just `wayland` we never run the tests with Wayland. This change
rectifies this.
2023-07-19 16:22:31 +02:00
Eberhard Beilharz
81f46e1a6d
feat(linux): Minimize tags before adding keyboards
This ensures that bcp47 language tags are in a form the OS
understands.
2023-07-19 16:20:27 +02:00
Eberhard Beilharz
749112660d
chore(linux): Move some files to keyman-config
Some of the configuration files are useful for other distributions
as well. So this change moves them out of `debian/` to
`linux/keyman-config` so that they will be included in the source
tar ball.

Also remove zero-width space from one file.

Closes #8880.
2023-06-05 15:24:41 +02:00
Eberhard Beilharz
ab25157364
feat(linux): Refactor to benefit from C++ RAII
Also apply changes from code review comments.
2023-05-22 19:51:45 +02:00
Eberhard Beilharz
f6e5e468c4
chore(linux): Rename test-helper.sh to test-helper.inc.sh
Follow-up of code review.
2023-05-16 10:59:16 +02:00
Eberhard Beilharz
c2e6fe23bd
feat(linux): Client side 2023-05-15 09:13:58 +02:00
Eberhard Beilharz
24d808a210
chore(linux): Address code review comments
This is a follow-up of #8510.
2023-05-09 11:03:55 +02:00
Eberhard Beilharz
215e8d5eb8
Update linux/ibus-keyman/tests/scripts/test-helper.sh
Co-authored-by: Steven R. Loomis <srl295@gmail.com>
2023-05-08 09:53:45 +02:00
Eberhard Beilharz
f150f0cd68
Update linux/ibus-keyman/tests/scripts/test-helper.sh
Co-authored-by: Steven R. Loomis <srl295@gmail.com>
2023-05-08 09:53:36 +02:00
Eberhard Beilharz
a7630a0265
fix(linux): Fix linux tests 2023-05-05 10:55:45 +02:00
Marc Durdin
c5d79a9fb4
Merge pull request #7330 from keymanapp/feature-kmcompx
epic: kmcompx - kmcmpdll cross-platform compiler 🚑
2023-04-10 07:34:04 +10:00
Eberhard Beilharz
38b2254d39
chore(linux): Improve robustness of test cleanup
Closes #8517.
2023-03-28 19:51:17 +02:00
Marc Durdin
c18ef54029 refactor(common): move core baseline tests into common
Decided to use the name `baseline` for this set of tests. They can be
used by any project in the repo now. Tests will be treated as shared,
and not modified (except in the case of a buggy test).

* Moves .kmn files, add `&NAME` line (don't use meson templating for
  these files)
* Generates reference .kmx files using kmcomp for use as a baseline with
  kmcmplib (kmc) tests, and for linux tests
* Updates references in core, kmcmplib, and linux builds
* Renames all the .kmn / .kmx to use a standardized, clean name format
  (this was needed for building packages in the core tests)
2023-03-28 05:20:45 +07:00
Eberhard Beilharz
794557f7d5
chore(core): Remove obsolete --target-path option
Linux package builds no longer require a different target path, so
we can remove the `--target-path` parameter.
2023-03-07 13:38:31 +01:00
Marc Durdin
a0fa39232d chore(linux): use core kmx tests from source rather than build 2023-02-24 05:57:15 +07:00
Darcy Wong
7a7ba2f70c chore(linux): Set test-helper script executable 2023-02-07 10:38:08 +07:00
Eberhard Beilharz
0367df8652
chore(linux): Fix a few bugs in meson scripts 2023-02-02 19:06:55 +01:00