Commit 608e9361e39fe905f6cb2dc13bfd9a50c1c02310

Ran Benita 2020-07-25T16:30:39

tools: run test-tool-option-parsing.py like a regular test Signed-off-by: Ran Benita <ran@unusedvar.com>

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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
diff --git a/meson.build b/meson.build
index e201d7c..a4b0f7b 100644
--- a/meson.build
+++ b/meson.build
@@ -639,17 +639,10 @@ You can disable the Wayland xkbcli programs with -Denable-wayland=false.''')
         install_man('tools/xkbcli-list.1')
     endif
 
-    # pytest finds files named test_foo_bar.py but not
-    # test-foo-bar.py, let's rename the source file so it only ever finds the
-    # built one.
-    config_tool_option_test = configuration_data()
-    config_tool_option_test.set('MESON_BUILD_ROOT', meson.current_build_dir())
-    tool_option_test = configure_file(input: 'tools/test-tool-option-parsing.py',
-                                      output: 'test_tool_option_parsing.py',
-                                      configuration : config_tool_option_test)
     test('tool-option-parsing',
-         tool_option_test,
-         args: [tool_option_test, '-n', 'auto'])
+         find_program('test/tool-option-parsing.py'),
+         env: test_env,
+         suite: ['python-tests'])
 endif
 
 
diff --git a/test/tool-option-parsing.py b/test/tool-option-parsing.py
new file mode 100755
index 0000000..764e3f2
--- /dev/null
+++ b/test/tool-option-parsing.py
@@ -0,0 +1,302 @@
+#!/usr/bin/env python3
+#
+# Copyright © 2020 Red Hat, Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+import itertools
+import os
+import resource
+import sys
+import subprocess
+import logging
+
+try:
+    import pytest
+except ImportError:
+    print('Failed to import pytest. Skipping.', file=sys.stderr)
+    sys.exit(77)
+
+
+top_builddir = os.environ['top_builddir']
+
+logging.basicConfig(level=logging.DEBUG)
+logger = logging.getLogger('test')
+logger.setLevel(logging.DEBUG)
+
+# Permutation of RMLVO that we use in multiple tests
+rmlvos = [list(x) for x in itertools.permutations(
+    ['--rules=evdev', '--model=pc104',
+     '--layout=fr', '--options=eurosign:5']
+)]
+
+
+def _disable_coredump():
+    resource.setrlimit(resource.RLIMIT_CORE, (0, 0))
+
+
+def run_command(args):
+    logger.debug('run command: {}'.format(' '.join(args)))
+
+    try:
+        p = subprocess.run(args, preexec_fn=_disable_coredump,
+                           capture_output=True, text=True,
+                           timeout=0.7)
+        return p.returncode, p.stdout, p.stderr
+    except subprocess.TimeoutExpired as e:
+        return 0, e.stdout, e.stderr
+
+
+class XkbcliTool:
+    xkbcli_tool = 'xkbcli'
+    subtool = None
+
+    def __init__(self, subtool=None):
+        self.tool_path = top_builddir
+        self.subtool = subtool
+
+    def run_command(self, args):
+        if self.subtool is not None:
+            tool = '{}-{}'.format(self.xkbcli_tool, self.subtool)
+        else:
+            tool = self.xkbcli_tool
+        args = [os.path.join(self.tool_path, tool)] + args
+
+        return run_command(args)
+
+    def run_command_success(self, args):
+        rc, stdout, stderr = self.run_command(args)
+        assert rc == 0, (stdout, stderr)
+        return stdout, stderr
+
+    def run_command_invalid(self, args):
+        rc, stdout, stderr = self.run_command(args)
+        assert rc == 2, (rc, stdout, stderr)
+        return rc, stdout, stderr
+
+    def run_command_unrecognized_option(self, args):
+        rc, stdout, stderr = self.run_command(args)
+        assert rc == 2, (rc, stdout, stderr)
+        assert stdout.startswith('Usage') or stdout == ''
+        assert 'unrecognized option' in stderr
+
+    def run_command_missing_arg(self, args):
+        rc, stdout, stderr = self.run_command(args)
+        assert rc == 2, (rc, stdout, stderr)
+        assert stdout.startswith('Usage') or stdout == ''
+        assert 'requires an argument' in stderr
+
+
+def get_tool(subtool=None):
+    return XkbcliTool(subtool)
+
+
+def get_all_tools():
+    return [get_tool(x) for x in [None, 'list',
+                                  'compile-keymap',
+                                  'how-to-type',
+                                  'interactive-evdev',
+                                  'interactive-wayland',
+                                  'interactive-x11']]
+
+
+@pytest.fixture
+def xkbcli():
+    return get_tool()
+
+
+@pytest.fixture
+def xkbcli_list():
+    return get_tool('list')
+
+
+@pytest.fixture
+def xkbcli_how_to_type():
+    return get_tool('how-to-type')
+
+
+@pytest.fixture
+def xkbcli_compile_keymap():
+    return get_tool('compile-keymap')
+
+
+@pytest.fixture
+def xkbcli_interactive_evdev():
+    return get_tool('interactive-evdev')
+
+
+@pytest.fixture
+def xkbcli_interactive_x11():
+    return get_tool('interactive-x11')
+
+
+@pytest.fixture
+def xkbcli_interactive_wayland():
+    return get_tool('interactive-wayland')
+
+
+# --help is supported by all tools
+@pytest.mark.parametrize('tool', get_all_tools())
+def test_help(tool):
+    stdout, stderr = tool.run_command_success(['--help'])
+    assert stdout.startswith('Usage:')
+    assert stderr == ''
+
+
+# --foobar generates "Usage:" for all tools
+@pytest.mark.parametrize('tool', get_all_tools())
+def test_invalid_option(tool):
+    tool.run_command_unrecognized_option(['--foobar'])
+
+
+# xkbcli --version
+def test_xkbcli_version(xkbcli):
+    stdout, stderr = xkbcli.run_command_success(['--version'])
+    assert stdout.startswith('0')
+    assert stderr == ''
+
+
+def test_xkbcli_too_many_args(xkbcli):
+    xkbcli.run_command_invalid(['a'] * 64)
+
+
+@pytest.mark.parametrize('args', [['--verbose'],
+                                  ['--rmlvo'],
+                                  ['--kccgst'],
+                                  ['--verbose', '--rmlvo'],
+                                  ['--verbose', '--kccgst'],
+                                  ])
+def test_compile_keymap_args(xkbcli_compile_keymap, args):
+    xkbcli_compile_keymap.run_command_success(args)
+
+
+@pytest.mark.parametrize('rmlvos', rmlvos)
+def test_compile_keymap_rmlvo(xkbcli_compile_keymap, rmlvos):
+    xkbcli_compile_keymap.run_command_success(rmlvos)
+
+
+@pytest.mark.parametrize('args', [['--include', '.', '--include-defaults'],
+                                  ['--include', '/tmp', '--include-defaults'],
+                                  ])
+def test_compile_keymap_include(xkbcli_compile_keymap, args):
+    # Succeeds thanks to include-defaults
+    xkbcli_compile_keymap.run_command_success(args)
+
+
+def test_compile_keymap_include_invalid(xkbcli_compile_keymap):
+    # A non-directory is rejected by default
+    args = ['--include', '/proc/version']
+    rc, stdout, stderr = xkbcli_compile_keymap.run_command(args)
+    assert rc == 1, (stdout, stderr)
+    assert "There are no include paths to search" in stderr
+
+    # A non-existing directory is rejected by default
+    args = ['--include', '/tmp/does/not/exist']
+    rc, stdout, stderr = xkbcli_compile_keymap.run_command(args)
+    assert rc == 1, (stdout, stderr)
+    assert "There are no include paths to search" in stderr
+
+    # Valid dir, but missing files
+    args = ['--include', '/tmp']
+    rc, stdout, stderr = xkbcli_compile_keymap.run_command(args)
+    assert rc == 1, (stdout, stderr)
+    assert "Couldn't look up rules" in stderr
+
+
+# Unicode codepoint conversions, we support whatever strtol does
+@pytest.mark.parametrize('args', [['123'], ['0x123'], ['0123']])
+def test_how_to_type(xkbcli_how_to_type, args):
+    xkbcli_how_to_type.run_command_success(args)
+
+
+@pytest.mark.parametrize('rmlvos', rmlvos)
+def test_how_to_type_rmlvo(xkbcli_how_to_type, rmlvos):
+    args = rmlvos + ['0x1234']
+    xkbcli_how_to_type.run_command_success(args)
+
+
+@pytest.mark.parametrize('args', [['--verbose'],
+                                  ['-v'],
+                                  ['--verbose', '--load-exotic'],
+                                  ['--load-exotic'],
+                                  ['--ruleset=evdev'],
+                                  ['--ruleset=base'],
+                                  ])
+def test_list_rmlvo(xkbcli_list, args):
+    xkbcli_list.run_command_success(args)
+
+
+def test_list_rmlvo_includes(xkbcli_list):
+    args = ['/tmp/']
+    xkbcli_list.run_command_success(args)
+
+
+def test_list_rmlvo_includes_invalid(xkbcli_list):
+    args = ['/proc/version']
+    rc, stdout, stderr = xkbcli_list.run_command(args)
+    assert rc == 1
+    assert "Failed to append include path" in stderr
+
+
+def test_list_rmlvo_includes_no_defaults(xkbcli_list):
+    args = ['--skip-default-paths', '/tmp']
+    rc, stdout, stderr = xkbcli_list.run_command(args)
+    assert rc == 1
+    assert "Failed to parse XKB description" in stderr
+
+
+@pytest.mark.skipif(not os.path.exists('/dev/input/event0'), reason='event node required')
+@pytest.mark.skipif(not os.access('/dev/input/event0', os.R_OK), reason='insufficient permissions')
+@pytest.mark.parametrize('rmlvos', rmlvos)
+def test_interactive_evdev_rmlvo(xkbcli_interactive_evdev, rmlvos):
+    return
+    xkbcli_interactive_evdev.run_command_success(rmlvos)
+
+
+@pytest.mark.skipif(not os.path.exists('/dev/input/event0'),
+                    reason='event node required')
+@pytest.mark.skipif(not os.access('/dev/input/event0', os.R_OK),
+                    reason='insufficient permissions')
+@pytest.mark.parametrize('args', [['--report-state-changes'],
+                                  ['--enable-compose'],
+                                  ['--consumed-mode=xkb'],
+                                  ['--consumed-mode=gtk'],
+                                  ])
+def test_interactive_evdev(xkbcli_interactive_evdev, args):
+    # Note: --enable-compose fails if $prefix doesn't have the compose tables
+    # installed
+    xkbcli_interactive_evdev.run_command_success(args)
+
+
+@pytest.mark.skipif(not os.getenv('DISPLAY'), reason='DISPLAY not set')
+def test_interactive_x11(xkbcli_interactive_x11):
+    # To be filled in if we handle something other than --help
+    pass
+
+
+@pytest.mark.skipif(not os.getenv('WAYLAND_DISPLAY'),
+                    reason='WAYLAND_DISPLAY not set')
+def test_interactive_wayland(xkbcli_interactive_wayland):
+    # To be filled in if we handle something other than --help
+    pass
+
+
+if __name__ == '__main__':
+    sys.exit(pytest.main(args=[__file__]))
diff --git a/tools/test-tool-option-parsing.py b/tools/test-tool-option-parsing.py
deleted file mode 100755
index 27af46e..0000000
--- a/tools/test-tool-option-parsing.py
+++ /dev/null
@@ -1,300 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright © 2020 Red Hat, Inc.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-import itertools
-import os
-import resource
-import sys
-import subprocess
-import logging
-
-try:
-    import pytest
-except ImportError:
-    print('Failed to import pytest. Skipping.', file=sys.stderr)
-    sys.exit(77)
-
-
-logging.basicConfig(level=logging.DEBUG)
-logger = logging.getLogger('test')
-logger.setLevel(logging.DEBUG)
-
-# Permutation of RMLVO that we use in multiple tests
-rmlvos = [list(x) for x in itertools.permutations(
-    ['--rules=evdev', '--model=pc104',
-     '--layout=fr', '--options=eurosign:5']
-)]
-
-
-def _disable_coredump():
-    resource.setrlimit(resource.RLIMIT_CORE, (0, 0))
-
-
-def run_command(args):
-    logger.debug('run command: {}'.format(' '.join(args)))
-
-    try:
-        p = subprocess.run(args, preexec_fn=_disable_coredump,
-                           capture_output=True, text=True,
-                           timeout=0.7)
-        return p.returncode, p.stdout, p.stderr
-    except subprocess.TimeoutExpired as e:
-        return 0, e.stdout, e.stderr
-
-
-class XkbcliTool:
-    xkbcli_tool = 'xkbcli'
-    subtool = None
-
-    def __init__(self, subtool=None):
-        self.tool_path = "@MESON_BUILD_ROOT@"
-        self.subtool = subtool
-
-    def run_command(self, args):
-        if self.subtool is not None:
-            tool = '{}-{}'.format(self.xkbcli_tool, self.subtool)
-        else:
-            tool = self.xkbcli_tool
-        args = [os.path.join(self.tool_path, tool)] + args
-
-        return run_command(args)
-
-    def run_command_success(self, args):
-        rc, stdout, stderr = self.run_command(args)
-        assert rc == 0, (stdout, stderr)
-        return stdout, stderr
-
-    def run_command_invalid(self, args):
-        rc, stdout, stderr = self.run_command(args)
-        assert rc == 2, (rc, stdout, stderr)
-        return rc, stdout, stderr
-
-    def run_command_unrecognized_option(self, args):
-        rc, stdout, stderr = self.run_command(args)
-        assert rc == 2, (rc, stdout, stderr)
-        assert stdout.startswith('Usage') or stdout == ''
-        assert 'unrecognized option' in stderr
-
-    def run_command_missing_arg(self, args):
-        rc, stdout, stderr = self.run_command(args)
-        assert rc == 2, (rc, stdout, stderr)
-        assert stdout.startswith('Usage') or stdout == ''
-        assert 'requires an argument' in stderr
-
-
-def get_tool(subtool=None):
-    return XkbcliTool(subtool)
-
-
-def get_all_tools():
-    return [get_tool(x) for x in [None, 'list',
-                                  'compile-keymap',
-                                  'how-to-type',
-                                  'interactive-evdev',
-                                  'interactive-wayland',
-                                  'interactive-x11']]
-
-
-@pytest.fixture
-def xkbcli():
-    return get_tool()
-
-
-@pytest.fixture
-def xkbcli_list():
-    return get_tool('list')
-
-
-@pytest.fixture
-def xkbcli_how_to_type():
-    return get_tool('how-to-type')
-
-
-@pytest.fixture
-def xkbcli_compile_keymap():
-    return get_tool('compile-keymap')
-
-
-@pytest.fixture
-def xkbcli_interactive_evdev():
-    return get_tool('interactive-evdev')
-
-
-@pytest.fixture
-def xkbcli_interactive_x11():
-    return get_tool('interactive-x11')
-
-
-@pytest.fixture
-def xkbcli_interactive_wayland():
-    return get_tool('interactive-wayland')
-
-
-# --help is supported by all tools
-@pytest.mark.parametrize('tool', get_all_tools())
-def test_help(tool):
-    stdout, stderr = tool.run_command_success(['--help'])
-    assert stdout.startswith('Usage:')
-    assert stderr == ''
-
-
-# --foobar generates "Usage:" for all tools
-@pytest.mark.parametrize('tool', get_all_tools())
-def test_invalid_option(tool):
-    tool.run_command_unrecognized_option(['--foobar'])
-
-
-# xkbcli --version
-def test_xkbcli_version(xkbcli):
-    stdout, stderr = xkbcli.run_command_success(['--version'])
-    assert stdout.startswith('0')
-    assert stderr == ''
-
-
-def test_xkbcli_too_many_args(xkbcli):
-    xkbcli.run_command_invalid(['a'] * 64)
-
-
-@pytest.mark.parametrize('args', [['--verbose'],
-                                  ['--rmlvo'],
-                                  ['--kccgst'],
-                                  ['--verbose', '--rmlvo'],
-                                  ['--verbose', '--kccgst'],
-                                  ])
-def test_compile_keymap_args(xkbcli_compile_keymap, args):
-    xkbcli_compile_keymap.run_command_success(args)
-
-
-@pytest.mark.parametrize('rmlvos', rmlvos)
-def test_compile_keymap_rmlvo(xkbcli_compile_keymap, rmlvos):
-    xkbcli_compile_keymap.run_command_success(rmlvos)
-
-
-@pytest.mark.parametrize('args', [['--include', '.', '--include-defaults'],
-                                  ['--include', '/tmp', '--include-defaults'],
-                                  ])
-def test_compile_keymap_include(xkbcli_compile_keymap, args):
-    # Succeeds thanks to include-defaults
-    xkbcli_compile_keymap.run_command_success(args)
-
-
-def test_compile_keymap_include_invalid(xkbcli_compile_keymap):
-    # A non-directory is rejected by default
-    args = ['--include', '/proc/version']
-    rc, stdout, stderr = xkbcli_compile_keymap.run_command(args)
-    assert rc == 1, (stdout, stderr)
-    assert "There are no include paths to search" in stderr
-
-    # A non-existing directory is rejected by default
-    args = ['--include', '/tmp/does/not/exist']
-    rc, stdout, stderr = xkbcli_compile_keymap.run_command(args)
-    assert rc == 1, (stdout, stderr)
-    assert "There are no include paths to search" in stderr
-
-    # Valid dir, but missing files
-    args = ['--include', '/tmp']
-    rc, stdout, stderr = xkbcli_compile_keymap.run_command(args)
-    assert rc == 1, (stdout, stderr)
-    assert "Couldn't look up rules" in stderr
-
-
-# Unicode codepoint conversions, we support whatever strtol does
-@pytest.mark.parametrize('args', [['123'], ['0x123'], ['0123']])
-def test_how_to_type(xkbcli_how_to_type, args):
-    xkbcli_how_to_type.run_command_success(args)
-
-
-@pytest.mark.parametrize('rmlvos', rmlvos)
-def test_how_to_type_rmlvo(xkbcli_how_to_type, rmlvos):
-    args = rmlvos + ['0x1234']
-    xkbcli_how_to_type.run_command_success(args)
-
-
-@pytest.mark.parametrize('args', [['--verbose'],
-                                  ['-v'],
-                                  ['--verbose', '--load-exotic'],
-                                  ['--load-exotic'],
-                                  ['--ruleset=evdev'],
-                                  ['--ruleset=base'],
-                                  ])
-def test_list_rmlvo(xkbcli_list, args):
-    xkbcli_list.run_command_success(args)
-
-
-def test_list_rmlvo_includes(xkbcli_list):
-    args = ['/tmp/']
-    xkbcli_list.run_command_success(args)
-
-
-def test_list_rmlvo_includes_invalid(xkbcli_list):
-    args = ['/proc/version']
-    rc, stdout, stderr = xkbcli_list.run_command(args)
-    assert rc == 1
-    assert "Failed to append include path" in stderr
-
-
-def test_list_rmlvo_includes_no_defaults(xkbcli_list):
-    args = ['--skip-default-paths', '/tmp']
-    rc, stdout, stderr = xkbcli_list.run_command(args)
-    assert rc == 1
-    assert "Failed to parse XKB description" in stderr
-
-
-@pytest.mark.skipif(not os.path.exists('/dev/input/event0'), reason='event node required')
-@pytest.mark.skipif(not os.access('/dev/input/event0', os.R_OK), reason='insufficient permissions')
-@pytest.mark.parametrize('rmlvos', rmlvos)
-def test_interactive_evdev_rmlvo(xkbcli_interactive_evdev, rmlvos):
-    return
-    xkbcli_interactive_evdev.run_command_success(rmlvos)
-
-
-@pytest.mark.skipif(not os.path.exists('/dev/input/event0'),
-                    reason='event node required')
-@pytest.mark.skipif(not os.access('/dev/input/event0', os.R_OK),
-                    reason='insufficient permissions')
-@pytest.mark.parametrize('args', [['--report-state-changes'],
-                                  ['--enable-compose'],
-                                  ['--consumed-mode=xkb'],
-                                  ['--consumed-mode=gtk'],
-                                  ])
-def test_interactive_evdev(xkbcli_interactive_evdev, args):
-    # Note: --enable-compose fails if $prefix doesn't have the compose tables
-    # installed
-    xkbcli_interactive_evdev.run_command_success(args)
-
-
-@pytest.mark.skipif(not os.getenv('DISPLAY'), reason='DISPLAY not set')
-def test_interactive_x11(xkbcli_interactive_x11):
-    # To be filled in if we handle something other than --help
-    pass
-
-
-@pytest.mark.skipif(not os.getenv('WAYLAND_DISPLAY'),
-                    reason='WAYLAND_DISPLAY not set')
-def test_interactive_wayland(xkbcli_interactive_wayland):
-    # To be filled in if we handle something other than --help
-    pass
-
-
-if __name__ == '__main__':
-    pytest.main(args=['@MESON_BUILD_ROOT@'])