• Home
  • Raw
  • Download

Lines Matching +full:libinput +full:- +full:test +full:- +full:suite +full:- +full:pointer

1 project('libinput', 'c',  project
9 dir_data = get_option('prefix') / get_option('datadir') / 'libinput'
11 dir_overrides = get_option('prefix') / get_option('sysconfdir') / 'libinput'
12 dir_libexec = get_option('prefix') / get_option('libexecdir') / 'libinput'
17 dir_src_test = meson.current_source_dir() / 'test'
19 dir_gitlab_ci = meson.current_source_dir() / '.gitlab-ci'
21 dir_udev = get_option('udev-dir')
31 # We use libtool-version numbers because it's easier to understand.
44 libinput_so_version = '@0@.@1@.@2@'.format((libinput_lt_c - libinput_lt_a),
50 '-Wno-unused-parameter',
51 '-Wmissing-prototypes',
52 '-Wstrict-prototypes',
53 '-Wundef',
54 '-Wlogical-op',
55 '-Wpointer-arith',
56 '-Wuninitialized',
57 '-Winit-self',
58 '-Wstrict-prototypes',
59 '-Wimplicit-fallthrough',
60 '-Wredundant-decls',
61 '-Wincompatible-pointer-types',
62 '-Wformat=2',
63 '-Wno-missing-field-initializers',
64 '-Wmissing-declarations',
66 '-fvisibility=hidden',
73 doc_url_base = 'https://wayland.freedesktop.org/libinput/doc'
142 config_h.set10('HAVE_INSTALLED_TESTS', get_option('install-tests'))
171 executable('libinput-device-group',
172 'udev/libinput-device-group.c',
177 executable('libinput-fuzz-extract',
178 'udev/libinput-fuzz-extract.c',
179 'src/util-strings.c',
180 'src/util-prop-parsers.c',
185 executable('libinput-fuzz-to-zero',
186 'udev/libinput-fuzz-to-zero.c',
194 configure_file(input : 'udev/80-libinput-device-groups.rules.in',
195 output : '80-libinput-device-groups.rules',
198 configure_file(input : 'udev/90-libinput-fuzz-override.rules.in',
199 output : '90-libinput-fuzz-override.rules',
205 litest_groups_rules_file = configure_file(input : 'udev/80-libinput-device-groups.rules.in',
206 output : '80-libinput-device-groups-litest.rules',
208 litest_fuzz_override_file = configure_file(input : 'udev/90-libinput-fuzz-override.rules.in',
209 output : '90-libinput-fuzz-override-litest.rules',
214 # This test should be defined first so we don't waste time testing anything
215 # else if we're about to fail anyway. ninja test will execute tests in the
219 test('leftover-rules',
220 find_program('test/check-leftover-udev-rules.sh'),
222 suite : ['all'])
225 ############ libepoll-shim (BSD) ############
228 # epoll is built-in (Linux, illumos)
231 # epoll is implemented in userspace by libepoll-shim (FreeBSD)
232 dir_libepoll = get_option('epoll-dir')
236 includes_epoll = include_directories(dir_libepoll / 'include' / 'libepoll-shim')
237 dep_libepoll = cc.find_library('epoll-shim', dirs : dir_libepoll / 'lib')
243 name : 'libepoll-shim check',
246 error('No built-in epoll or libepoll-shim found.')
253 ############ libinput-util.a ############
255 # Basic compilation test to make sure the headers include and define all the
258 'util-bits.h',
259 'util-input-event.h',
260 'util-list.h',
261 'util-macros.h',
262 'util-matrix.h',
263 'util-prop-parsers.h',
264 'util-ratelimit.h',
265 'util-strings.h',
266 'util-time.h',
271 testfile = configure_file(input : 'test/test-util-includes.c',
272 output : 'test-util-includes-@0@.c'.format(h),
274 executable('test-build-@0@'.format(h),
281 'src/util-list.c',
282 'src/util-ratelimit.c',
283 'src/util-strings.c',
284 'src/util-prop-parsers.c',
286 libinput_util = static_library('libinput-util',
295 'src/filter-custom.c',
296 'src/filter-flat.c',
297 'src/filter-low-dpi.c',
298 'src/filter-mouse.c',
299 'src/filter-touchpad.c',
300 'src/filter-touchpad-flat.c',
301 'src/filter-touchpad-x230.c',
302 'src/filter-tablet.c',
303 'src/filter-trackpoint.c',
304 'src/filter-trackpoint-flat.c',
313 libinput_data_override_path = dir_overrides / 'local-overrides.quirks'
333 # Create /etc/libinput
335 install_emptydir(dir_etc / 'libinput')
337 install_subdir('libinput', install_dir : dir_etc) subdir
340 ############ libinput.so ############
341 install_headers('src/libinput.h')
343 'src/libinput.c',
344 'src/libinput-private-config.c',
346 'src/evdev-debounce.c',
347 'src/evdev-fallback.c',
348 'src/evdev-totem.c',
349 'src/evdev-middle-button.c',
350 'src/evdev-mt-touchpad.c',
351 'src/evdev-mt-touchpad-tap.c',
352 'src/evdev-mt-touchpad-thumb.c',
353 'src/evdev-mt-touchpad-buttons.c',
354 'src/evdev-mt-touchpad-edge-scroll.c',
355 'src/evdev-mt-touchpad-gestures.c',
356 'src/evdev-tablet.c',
357 'src/evdev-tablet-pad.c',
358 'src/evdev-tablet-pad-leds.c',
359 'src/evdev-wheel.c',
360 'src/path-seat.c',
361 'src/udev-seat.c',
384 input : 'src/libinput-version.h.in',
385 output : 'libinput-version.h',
389 mapfile = dir_src / 'libinput.sym'
390 version_flag = '-Wl,--version-script,@0@'.format(mapfile)
406 meson.override_dependency('libinput', dep_libinput)
410 filebase : 'libinput',
411 name : 'Libinput',
419 input : 'src/libinput-git-version.h.in',
420 output :'libinput-git-version.h')
447 'tools/libinput-debug-events.c',
450 executable('libinput-debug-events',
458 libinput_debug_tablet_sources = [ 'tools/libinput-debug-tablet.c' ]
459 executable('libinput-debug-tablet',
467 libinput_quirks_sources = [ 'tools/libinput-quirks.c' ]
468 libinput_quirks = executable('libinput-quirks',
475 test('validate-quirks',
477 args: ['validate', '--data-dir=@0@'.format(dir_src_quirks)],
478 suite : ['all']
481 quirks_file_tester = find_program('test/test_quirks_files.py')
482 test('validate-quirks-files',
484 suite : ['all'],
488 libinput_list_devices_sources = [ 'tools/libinput-list-devices.c' ]
489 libinput_list_devices = executable('libinput-list-devices',
496 test('list-devices',
498 suite : ['all', 'root', 'hardware'])
500 libinput_measure_sources = [ 'tools/libinput-measure.c' ]
501 executable('libinput-measure',
509 libinput_analyze_sources = [ 'tools/libinput-analyze.c' ]
510 executable('libinput-analyze',
519 'tools/libinput-analyze-per-slot-delta.py',
520 'tools/libinput-analyze-recording.py',
521 'tools/libinput-analyze-touch-down-state.py',
522 'tools/libinput-list-kernel-devices.py',
523 'tools/libinput-measure-fuzz.py',
524 'tools/libinput-measure-touchpad-size.py',
525 'tools/libinput-measure-touchpad-tap.py',
526 'tools/libinput-measure-touchpad-pressure.py',
527 'tools/libinput-measure-touch-size.py',
528 'tools/libinput-replay.py'
539 libinput_record_sources = [ 'tools/libinput-record.c', git_version_h ]
540 executable('libinput-record',
548 config_h.set10('HAVE_DEBUG_GUI', get_option('debug-gui'))
549 if get_option('debug-gui')
553 dep_gtk = dependency('gtk+-3.0', version : '>= 3.20')
567 dep_glib = dependency('glib-2.0')
569 dep_wayland_client = dependency('wayland-client', required : false)
570 dep_wayland_protocols = dependency('wayland-protocols', required : false)
575 debug_gui_sources = [ 'tools/libinput-debug-gui.c' ]
578 wayland_scanner = find_program('wayland-scanner')
585 proto_name = 'pointer-constraints-unstable-v1'
586 input = files(wlproto_dir / 'unstable' / 'pointer-constraints' / '@0@.xml'.format(proto_name))
590 output: '@0@-client-protocol.h'.format(proto_name),
591 command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
596 output: '@0@-protocol.c'.format(proto_name),
597 command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
612 executable('libinput-debug-gui',
619 src_man += files('tools/libinput-debug-gui.man')
622 libinput_sources = [ 'tools/libinput-tool.c' ]
624 libinput_tool = executable('libinput', build
631 ptraccel_debug_sources = [ 'tools/ptraccel-debug.c' ]
632 executable('ptraccel-debug',
639 # Don't run the test during a release build because we rely on the magic
644 config_tool_option_test.set('MESON_ENABLED_DEBUG_GUI', get_option('debug-gui'))
650 test('tool-option-parsing',
653 suite : ['all', 'root'],
657 # the libinput tools check whether we execute from the builddir, this is
658 # the test to verify that lookup. We test twice, once as normal test
660 test_builddir_lookup = executable('test-builddir-lookup',
661 'test/test-builddir-lookup.c',
665 test('tools-builddir-lookup',
667 args : ['--builddir-is-set'],
668 suite : ['all'])
669 test('tools-builddir-lookup-installed',
670 find_program('test/helper-copy-and-exec-from-tmp.sh'),
671 args : [test_builddir_lookup.full_path(), '--builddir-is-null'],
673 suite : ['all'],
678 test('symbols-leak-test',
679 find_program('test/symbols-leak-test'),
680 args : [ dir_src / 'libinput.sym', dir_src],
681 suite : ['all'])
683 # build-test only
684 executable('test-build-pedantic',
685 'test/build-pedantic.c',
688 c_args : ['-std=c99', '-pedantic', '-Werror'],
690 # build-test only
691 executable('test-build-std-gnuc90',
692 'test/build-pedantic.c',
695 c_args : ['-std=gnu89', '-Werror'],
697 # test for linking with the minimal linker flags
698 executable('test-build-linker',
699 'test/build-pedantic.c',
703 # test including from C++ (in case CPP compiler is available)
705 executable('test-build-cxx',
706 'test/build-cxx.cc',
712 libinput_test_sources = [ 'tools/libinput-test.c' ]
713 executable('libinput-test', build
721 # This is the test suite runner, we allow disabling that one because of
729 # for inhibit support during test run
734 'src/libinput-private-config.c',
735 'test/litest-device-absinfo-override.c',
736 'test/litest-device-acer-hawaii-keyboard.c',
737 'test/litest-device-acer-hawaii-touchpad.c',
738 'test/litest-device-aiptek-tablet.c',
739 'test/litest-device-alps-3fg.c',
740 'test/litest-device-alps-semi-mt.c',
741 'test/litest-device-alps-dualpoint.c',
742 'test/litest-device-anker-mouse-kbd.c',
743 'test/litest-device-apple-appletouch.c',
744 'test/litest-device-apple-internal-keyboard.c',
745 'test/litest-device-apple-magicmouse.c',
746 'test/litest-device-asus-rog-gladius.c',
747 'test/litest-device-atmel-hover.c',
748 'test/litest-device-bcm5974.c',
749 'test/litest-device-calibrated-touchscreen.c',
750 'test/litest-device-cyborg-rat-5.c',
751 'test/litest-device-dell-canvas-totem.c',
752 'test/litest-device-dell-canvas-totem-touch.c',
753 'test/litest-device-elantech-touchpad.c',
754 'test/litest-device-elan-tablet.c',
755 'test/litest-device-format-string.c',
756 'test/litest-device-generic-pressurepad.c',
757 'test/litest-device-generic-singletouch.c',
758 'test/litest-device-gpio-keys.c',
759 'test/litest-device-huion-pentablet.c',
760 'test/litest-device-hp-wmi-hotkeys.c',
761 'test/litest-device-ignored-mouse.c',
762 'test/litest-device-keyboard.c',
763 'test/litest-device-keyboard-all-codes.c',
764 'test/litest-device-keyboard-quirked.c',
765 'test/litest-device-keyboard-razer-blackwidow.c',
766 'test/litest-device-keyboard-razer-blade-stealth.c',
767 'test/litest-device-keyboard-razer-blade-stealth-videoswitch.c',
768 'test/litest-device-lenovo-scrollpoint.c',
769 'test/litest-device-lid-switch.c',
770 'test/litest-device-lid-switch-surface3.c',
771 'test/litest-device-logitech-media-keyboard-elite.c',
772 'test/litest-device-logitech-trackball.c',
773 'test/litest-device-nexus4-touch-screen.c',
774 'test/litest-device-magic-trackpad.c',
775 'test/litest-device-mouse.c',
776 'test/litest-device-mouse-wheel-tilt.c',
777 'test/litest-device-mouse-roccat.c',
778 'test/litest-device-mouse-low-dpi.c',
779 'test/litest-device-mouse-wheel-click-angle.c',
780 'test/litest-device-mouse-wheel-click-count.c',
781 'test/litest-device-ms-nano-transceiver-mouse.c',
782 'test/litest-device-ms-surface-cover.c',
783 'test/litest-device-protocol-a-touch-screen.c',
784 'test/litest-device-qemu-usb-tablet.c',
785 'test/litest-device-sony-vaio-keys.c',
786 'test/litest-device-synaptics-x220.c',
787 'test/litest-device-synaptics-hover.c',
788 'test/litest-device-synaptics-i2c.c',
789 'test/litest-device-synaptics-pressurepad.c',
790 'test/litest-device-synaptics-rmi4.c',
791 'test/litest-device-synaptics-st.c',
792 'test/litest-device-synaptics-t440.c',
793 'test/litest-device-synaptics-x1-carbon-3rd.c',
794 'test/litest-device-synaptics-phantomclicks.c',
795 'test/litest-device-tablet-mode-switch.c',
796 'test/litest-device-thinkpad-extrabuttons.c',
797 'test/litest-device-trackpoint.c',
798 'test/litest-device-touch-screen.c',
799 'test/litest-device-touchpad-palm-threshold-zero.c',
800 'test/litest-device-touchscreen-invalid-range.c',
801 'test/litest-device-touchscreen-fuzz.c',
802 'test/litest-device-touchscreen-mt-tool.c',
803 'test/litest-device-uclogic-tablet.c',
804 'test/litest-device-wacom-bamboo-2fg-finger.c',
805 'test/litest-device-wacom-bamboo-2fg-pad.c',
806 'test/litest-device-wacom-bamboo-2fg-pen.c',
807 'test/litest-device-wacom-bamboo-16fg-pen.c',
808 'test/litest-device-wacom-calibrated-tablet.c',
809 'test/litest-device-wacom-cintiq-12wx-pen.c',
810 'test/litest-device-wacom-cintiq-13hdt-finger.c',
811 'test/litest-device-wacom-cintiq-13hdt-pad.c',
812 'test/litest-device-wacom-cintiq-13hdt-pen.c',
813 'test/litest-device-wacom-cintiq-24hd-pen.c',
814 'test/litest-device-wacom-cintiq-24hdt-pad.c',
815 'test/litest-device-wacom-cintiq-pro-16-finger.c',
816 'test/litest-device-wacom-cintiq-pro-16-pad.c',
817 'test/litest-device-wacom-cintiq-pro-16-pen.c',
818 'test/litest-device-wacom-ekr.c',
819 'test/litest-device-wacom-hid4800-pen.c',
820 'test/litest-device-wacom-intuos3-pad.c',
821 'test/litest-device-wacom-intuos5-finger.c',
822 'test/litest-device-wacom-intuos5-pad.c',
823 'test/litest-device-wacom-intuos5-pen.c',
824 'test/litest-device-wacom-isdv4-4200-pen.c',
825 'test/litest-device-wacom-isdv4-524c-pen.c',
826 'test/litest-device-wacom-isdv4-e6-pen.c',
827 'test/litest-device-wacom-isdv4-e6-finger.c',
828 'test/litest-device-wacom-mobilestudio-pro-pad.c',
829 'test/litest-device-waltop-tablet.c',
830 'test/litest-device-wheel-only.c',
831 'test/litest-device-xen-virtual-pointer.c',
832 'test/litest-device-vmware-virtual-usb-mouse.c',
833 'test/litest-device-yubikey.c',
834 'test/litest.c',
852 '80-libinput-device-groups-litest.rules')
855 '90-libinput-fuzz-override-litest.rules')
857 def_no_main = '-DLITEST_NO_MAIN'
858 def_disable_backtrace = '-DLITEST_DISABLE_BACKTRACE_LOGGING'
862 '-Wno-unused',
865 'test/litest-selftest.c',
866 'test/litest.c',
868 test_litest_selftest = executable('test-litest-selftest',
874 test('test-litest-selftest',
876 suite : ['all'],
879 …def_LT_VERSION = '-DLIBINPUT_LT_VERSION="@0@:@1@:@2@"'.format(libinput_lt_c, libinput_lt_r, libinp…
880 test_library_version = executable('test-library-version',
881 ['test/test-library-version.c'],
884 test('test-library-version',
886 suite : ['all'])
889 'test/test-utils.c',
891 test_utils = executable('libinput-test-utils',
896 install : get_option('install-tests'))
897 test('test-utils',
899 suite : ['all'])
903 'test/test-udev.c',
904 'test/test-path.c',
905 'test/test-pointer.c',
906 'test/test-touch.c',
907 'test/test-log.c',
908 'test/test-tablet.c',
909 'test/test-totem.c',
910 'test/test-pad.c',
911 'test/test-touchpad.c',
912 'test/test-touchpad-tap.c',
913 'test/test-touchpad-buttons.c',
914 'test/test-trackpoint.c',
915 'test/test-trackball.c',
916 'test/test-misc.c',
917 'test/test-keyboard.c',
918 'test/test-device.c',
919 'test/test-gestures.c',
920 'test/test-switch.c',
921 'test/test-quirks.c',
924 libinput_test_runner = executable('libinput-test-suite', build
929 install : get_option('install-tests'))
931 src_man += 'test/libinput-test-suite.man'
934 tfile = testfile.split('test/test-')[1]
936 test('libinput-test-suite-@0@'.format(group),
938 suite : ['all', 'valgrind', 'root', 'hardware'],
939 args : ['--filter-group=@0@'.format(group),
940 '--xml-output=junit-@0@-XXXXXX.xml'.format(group)],
945 test('libinput-test-deviceless',
947 suite : ['all', 'valgrind'],
948 args: ['--filter-deviceless',
949 '--xml-output=junit-deviceless-XXXXXX.xml'])
957 '--leak-check=full',
958 '--gen-suppressions=all',
959 '--error-exitcode=3',
960 '--suppressions=' + valgrind_suppressions_file ],
964 message('valgrind not found, disabling valgrind test suite')
966 configure_file(output : 'litest-config.h',
975 if get_option('install-tests')
980 if get_option('debug-gui')
987 'tools/libinput.man',
988 'tools/libinput-analyze.man',
989 'tools/libinput-analyze-per-slot-delta.man',
990 'tools/libinput-analyze-recording.man',
991 'tools/libinput-analyze-touch-down-state.man',
992 'tools/libinput-debug-events.man',
993 'tools/libinput-debug-tablet.man',
994 'tools/libinput-list-devices.man',
995 'tools/libinput-list-kernel-devices.man',
996 'tools/libinput-measure.man',
997 'tools/libinput-measure-fuzz.man',
998 'tools/libinput-measure-touchpad-size.man',
999 'tools/libinput-measure-touchpad-tap.man',
1000 'tools/libinput-measure-touchpad-pressure.man',
1001 'tools/libinput-measure-touch-size.man',
1002 'tools/libinput-quirks.man',
1003 'tools/libinput-record.man',
1004 'tools/libinput-replay.man',
1005 'tools/libinput-test.man',
1016 configure_file(input : 'tools/libinput-quirks.man',
1017 output : 'libinput-quirks-list.1',
1021 configure_file(input : 'tools/libinput-quirks.man',
1022 output : 'libinput-quirks-validate.1',