Commit Graph

12 Commits (03ecaa6b5337a4a34467202c04523c9f5334dbf3)

Author SHA1 Message Date
Peter Hutterer 29e80e7b76 tools: install our tools as xkbcli subcommands
The xkbcli tool usage help is ifdef'd out where the tool isn't built but the
man page always includes all tools. Easier that way.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-25 11:05:14 +03:00
Peter Hutterer 43b9d09248 test: fix the xkeyboard-config test for the prefixed tool name
Regression introduced in 362130debb

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-01 08:19:40 +10:00
Ran Benita 3515ba19a6 test: xkeyboard-config: bring back the progress bar
Signed-off-by: Ran Benita <ran@unusedvar.com>
2019-11-01 10:45:43 +02:00
Peter Hutterer 8f93e22a37 test: xkeyboard-config: invoke the python3 command (#120)
python3 is always python3, but python could be python2 in some cases. Or just
missing (e.g. RHEL8).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-01 10:41:16 +02:00
Peter Hutterer 0609073ce0 test: xkeyboard-config: add missing variant tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-01 10:24:03 +02:00
Peter Hutterer f4a0f73882 test: xkeyboard-config: use universal_newlines instead of decode
This way stdin/stdout of the process are opened in text mode and we don't need
manually decode.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-01 10:24:03 +02:00
Peter Hutterer 7832cc727c test: xkeyboard-config: flake8 fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-01 10:24:03 +02:00
Peter Hutterer cd5a24aa38 test: xkeyboard-config: handle keyboard interrupts correctly
In python multiprocessing, each process needs to handle (and ignore) the
KeyboardInterrupt to avoid exception logging. This is a separate patch for
easier reviewing, the first hunks merely re-indent all of the
xkbcommontool/xkbcomp functions into a try/except KeyboardInterrupt block.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-01 10:24:03 +02:00
Peter Hutterer 9fc0cb8777 test: xkeyboard-config: print to stderr on failure, stdout otherwise
This is a change in behavior and requires any automated callers to adjust
accordingly. Still, much easier to get the errors that way rather than it
being mixed into a thousands-of-lines output file.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-01 10:24:03 +02:00
Peter Hutterer f53838477d test: xkeyboard-config: add a multiprocessing.Pool() to speed up the test
Collect all options into a dictionary, then process that as async actions
through a process pool. This of course requires collecting the various print
statements to avoid mangled output.

This dropped the time to completion from around 14 min to 8 min on my local
machine (unscientific single run only for the original timing).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-01 10:24:03 +02:00
Peter Hutterer 1e13190685 test: xkeyboard-config: use argparse for the path and the tool selection
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-01 10:24:03 +02:00
Peter Hutterer d1cb8ad409 test: add a tool to test-compile all LVO combinations from xkeyboard-config
This test contains of two parts:
- a simple program to convert RMLVO commandline arguments into a keymap (and
  print that keymap if requested).
- a python script that runs through rules/evdev.xml, and tries to compile a
  keymap for sort-of every layout/variant/option combination. Sort-of, because
  we can have multiple options and it really only does one per layout(variant)
  combination.

Same thing can be done using xkbcomp, but right now it doesn't take that as
argument, it's hard-coded.

This takes quite a while, installing python-tqdm is recommended to see fancy
progress bars instead of just miles of dumps.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-08-21 11:30:45 +10:00