Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools: added --test option #535

Merged
merged 2 commits into from
Nov 18, 2024
Merged

Conversation

wismill
Copy link
Member

@wismill wismill commented Nov 14, 2024

  • Added --test option to xkbcli compile-{keymap,compose} tool, to enable testing compilation without printing the resulting file.
  • Improved xkeyboard-config-test script:
    • Make use of previous new option to speedup test (≈25% faster).
    • Refactored to make keymap writing in workers, not in the main process.
    • Added --compress option to enable keymap compression with gunzip.

The new flag `--test` enables to only test if compilation succeeds,
without printing the corresponding keymap or Compose file.

This is useful for quick feedback and to speedup some tests suites, e.g.
for `xkeyboard-config`.
- Refactored to write files within the workers, else we have only one
  worker writing, slowly consuming the result queue. In some scenarios
  it may even result in out-of-memory as the resulting keymaps piles up.
- Added the option `--compress` to allow compressing keymaps files with
  gunzip.
- Use the recently added `--test` option for `xkbcli-compile-keymap`
  when we only want to test compilation, not the resulting keymap file.
  This speeds up the test suite of `xkeyboard-config`.
@wismill wismill added the compile-keymap Indicates a need for improvements or additions to keymap compilation label Nov 14, 2024
@wismill wismill added this to the 1.8.0 milestone Nov 14, 2024
@wismill wismill merged commit 15da5ee into xkbcommon:master Nov 18, 2024
4 checks passed
@wismill wismill deleted the tools/test-compilation branch November 18, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compile-keymap Indicates a need for improvements or additions to keymap compilation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant