summaryrefslogtreecommitdiff
path: root/test/tool-option-parsing.py
Commit message (Collapse)AuthorAgeFilesLines
* test: show the tool exit status on failurePeter Hutterer2022-01-241-1/+1
| | | | | We already do so for the non-successful cases, let's do this here too so we know whether it was a signal or a normal exit.
* test/tool-option-parsing: don't depend on build prefixRan Benita2021-05-221-0/+4
| | | | | Fixes: https://github.com/xkbcommon/libxkbcommon/issues/244 Signed-off-by: Ran Benita <ran@unusedvar.com>
* test: allow skipping errors in certain conditionsPeter Hutterer2021-04-221-2/+11
| | | | | | | | | | Add a skipError test function that can analyse rc, stdout, stderr to skip a test even when we expect an error. We use that to skip if we couldn't find a keyboard in the interactive-evdev test. Fixes #235 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: fix interactive evdev test invocationPeter Hutterer2021-01-231-1/+1
| | | | | | | | | rmlvos is the parent list which then fails during a list join because, well, it's a list of lists. Fixes #206 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: fill in srcdir/builddir when not set in the environmentPeter Hutterer2021-01-231-2/+13
| | | | | | | Makes this test easier to run from the commandline. Where either of top_srcdir or top_builddir isn't set, fill them in from the CWD or fail otherwise. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test/tool-option-parsing: skip testing of disabled toolsRan Benita2020-09-081-28/+24
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* test/tool-option-parsing: switch from pytest to unittestRan Benita2020-09-081-196/+173
| | | | | | | | | | | | | For me, installing pytest for libxkbcommon is a bit problematic, so I end up skipping it which is not great. Switch to unittest which is built in to Python. It's not as nice as pytest but good enough in this case. Note: I was too lazy to switch the plain asserts to unittest assertions... Signed-off-by: Ran Benita <ran@unusedvar.com>
* test/tool-option-parsing: keep isolated by using our own test dataRan Benita2020-09-071-1/+6
| | | | | | Make it possible to run the test on all machines. Signed-off-by: Ran Benita <ran@unusedvar.com>
* test: fix the xkbcli --version testPeter Hutterer2020-09-071-1/+1
| | | | | | Fixes https://github.com/xkbcommon/libxkbcommon/issues/185 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add /etc/xkb as extra lookup path for system data filesPeter Hutterer2020-08-301-0/+2
| | | | | | | | | | | | | | | This completes the usual triplet of configuration locations available for most processes: - vendor-provided data files in /usr/share/X11/xkb - system-specific data files in /etc/xkb - user-specific data files in $XDG_CONFIG_HOME/xkb The default lookup order user, system, vendor, just like everything else that uses these conventions. For include directives in rules files, the '%E' resolves to that path. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: ignore the real XDG_CONFIG_HOME during testsPeter Hutterer2020-07-271-1/+8
| | | | | | | | | | Let's not have our tests fail if the user has an incompatible $XDG_CONFIG_HOME/xkb directory. libxkbcommon has fallbacks when XDG_CONFIG_HOME isn't set so we need to override this with a real directory instead of just unsetting it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools/interactive-evdev: fixup 64bff65Ran Benita2020-07-271-0/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* test/tool-option-parsing: remove --kccgst test, it's private for nowRan Benita2020-07-251-2/+2
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* tools: run test-tool-option-parsing.py like a regular testRan Benita2020-07-251-0/+302
Signed-off-by: Ran Benita <ran@unusedvar.com>