File: README.md

package info (click to toggle)
keyman 18.0.246-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,316 kB
  • sloc: python: 52,784; cpp: 21,289; sh: 7,633; ansic: 4,823; xml: 3,617; perl: 959; makefile: 139; javascript: 138
file content (49 lines) | stat: -rw-r--r-- 1,638 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# 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:

```bash
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.

```bash
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:

```bash
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.