aboutsummaryrefslogtreecommitdiffstats
path: root/tests/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* tests: Depend on exec-fd-leak-checkerMatt Turner2025-06-081-2/+5
| | | | | Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/514 Signed-off-by: Matt Turner <mattst88@gmail.com>
* tests: Add support for specifying runtime dependenciesMatt Turner2025-06-081-0/+2
| | | | Signed-off-by: Matt Turner <mattst88@gmail.com>
* tests: Make `tests` dict elements dicts themselvesMatt Turner2025-06-081-64/+97
| | | | | | | Previously each value was a list of extra sources. The next commit will add an additional field to each test, so they need to be dicts themselves. Signed-off-by: Matt Turner <mattst88@gmail.com>
* scanner: add validators for enumsSimon Ser2024-04-231-0/+1
| | | | | | | | | | | | | | Right now compositors need to manually check that enum values sent by the client are valid. In particular: - Check that the value sent by the client is not outside of the enum. - Check that the version of the enum entry is consistent with the object version. Automatically generate validator functions to perform these tasks. Signed-off-by: Simon Ser <contact@emersion.fr> Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/104
* build: add a gen-scanner-test targetSimon Ser2024-01-151-6/+14
| | | | | | | | This adds a command to re-generate the test data. This needs to be done when either an XML source file or the scanner's output is changed. Signed-off-by: Simon Ser <contact@emersion.fr>
* tests: add missing proxy-testSimon Ser2023-06-201-0/+4
| | | | | | This was probably lost during a rebase. Signed-off-by: Simon Ser <contact@emersion.fr>
* tests: drop misleading fixed-benchmarkManuel Stoeckl2023-05-031-9/+0
| | | | | | | | | | | Because this benchmark performed wl_fixed_to_double conversions on a long sequence of consecutive integers, the compiler could optimize away the addition performed in wl_fixed_to_double, merging it with the loop iteration code. This made tests/fixed-benchmark.c significantly underestimate the actual cost of the current wl_fixed_to_double implementation. Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
* build: sanity check optionsSimon Ser2022-05-101-0/+4
| | | | | | | | Fail when tests/documentation is enabled without libraries. Fail when neither scanner nor libraries is enabled, because we don't build anything in that case. Signed-off-by: Simon Ser <contact@emersion.fr>
* build: specify native arg in add_languages()Simon Ser2022-03-251-1/+1
| | | | | | | | | Fixes the following warning: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build. Signed-off-by: Simon Ser <contact@emersion.fr>
* build: use full_path() instead of path()Simon Ser2022-03-251-1/+1
| | | | | | | | | Fixes the following warning: WARNING: Project targeting '>= 0.56.0' but tried to use feature deprecated since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path() instead Signed-off-by: Simon Ser <contact@emersion.fr>
* Use epoll-shim to emulate epoll(7) on FreeBSDAlex Richardson2021-09-101-1/+2
| | | | | | | | FreeBSD does not provide epoll(7) and instead requires an external library, epoll-shim, that implements epoll() using kqueue(2) Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
* meson: only require cpp for testsJames Hilliard2021-04-161-7/+9
| | | | Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
* meson: link with -lrt if needed for clock_gettimeLoïc Yhuel2020-12-231-1/+1
| | | | | | This is already done in autotools, and fixes the build with glibc < 2.17. Signed-off-by: Loïc Yhuel <loic.yhuel@softathome.com>
* meson: Add option to control building wayland-scannerMatt Turner2020-03-131-10/+12
| | | | | | | | | | | | | | | | | | | | | | | Wayland requires a binary, wayland-scanner, to be run during the build process. For any configuration other than native builds (including cross compiling and even 32-bit x86 builds on an x86-64 build machine) Wayland's build process builds and uses its own wayland-scanner. For any builds using a cross file, wayland-scanner is built for the host machine and therefore cannot be executed during the build of the Wayland libraries. Instead builds using a cross file must execute the build machine's wayland-scanner (typically /usr/bin/wayland-scanner). As such, to build Wayland's libraries for a non-native ABI a package manager must build and install /usr/bin/wayland-scanner first. But then the build for the native ABI then rebuilds wayland-scanner itself and doesn't use the system's, and worse, wants to install its own, which conflicts with the /usr/bin/wayland-scanner already installed! So, add the -Dscanner=... option to control whether to install wayland-scanner. Signed-off-by: Matt Turner <mattst88@gmail.com>
* meson/tests: add missing dependencies on protocol headersJan Beich2020-02-151-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In file included from ../tests/connection-test.c:43: In file included from ../tests/test-compositor.h:30: ../src/wayland-client.h:40:10: fatal error: 'wayland-client-protocol.h' file not found #include "wayland-client-protocol.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../tests/display-test.c:45: In file included from ../src/wayland-server.h:104: src/wayland-server-protocol.h:4454:2: error: unterminated /* comment /** ^ In file included from ../tests/cpp-compile-test.cpp:2: In file included from src/wayland-server-protocol.h:8: In file included from ../src/wayland-server.h:104: src/wayland-server-protocol.h:3:2: error: unterminated conditional directive #ifndef WAYLAND_SERVER_PROTOCOL_H ^ ../tests/headers-protocol-test.c:33:2: error: including wayland-server-protocol.h did not include wayland-server.h! #error including wayland-server-protocol.h did not include wayland-server.h! ^ In file included from ../tests/headers-protocol-test.c:26: In file included from src/wayland-client-protocol.h:8: In file included from ../src/wayland-client.h:40: src/wayland-client-protocol.h:1358:2: error: unterminated conditional directive #ifndef WL_SHM_FORMAT_ENUM ^ In file included from ../tests/protocol-logger-test.c:34: In file included from ../src/wayland-client.h:40: src/wayland-client-protocol.h:2613:1: error: unterminated /* comment /** ^ ../tests/resources-test.c:49:36: error: use of undeclared identifier 'wl_seat_interface' res = wl_resource_create(client, &wl_seat_interface, 4, 0); ^
* meson: use strict wayland-scanner modeSimon Ser2020-01-151-3/+3
| | | | | | | Otherwise an invalid protocol will print warnings to stdout but won't make the build fail. Signed-off-by: Simon Ser <contact@emersion.fr>
* Add Meson buildEmmanuele Bassi2020-01-101-0/+153
Meson is a next generation build system, simpler than Autotools and also faster and more portable. Most importantly, it will make integrating ASan easier in CI. The goal is to maintain feature parity of the Meson build with the Autotools build, until such time when we can drop the latter. Add a script which generates the desired Doxygen configuration for our various output formats and executes it using that configuration. This is not something Meson can or should do. Fixes: https://gitlab.freedesktop.org/wayland/wayland/issues/80 [daniels: Changed to bump version, use GitLab issues URL, remove header checks not used in any code, remove pre-pkg-config Expat support, added missing include paths to wayland-egl and cpp-compile-test, added GitLab CI. Bumped version, removed unnecessary pkg-config paths.] [daniels: Properly install into mandir/man3 via some gross paramaterisation, generate real stamp files.] Pekka: - squashed patches - removed MAKEFLAGS from meson CI - remove unused PACKAGE* defines - fix up scanner dependency handling - instead of host_scanner option, build wayland-scanner twice when cross-compiling - changed .pc files to match more closely the autotools versions - reorder doxygen man sources to reduce diff to autotools - fix pkgconfig.generate syntax warnings (new in Meson) - bump meson version to 0.47 for configure_file(copy) and run_command(check) - move doc tool checks into doc/meson.build, needed in more places - make all doc tools mandatory if building docs - check dot and doxygen versions - add build files under doc/publican - reindent to match Weston Meson style Simon: - Remove install arg from configure_file - Don't build wayland-scanner twice during cross-build - Fix naming of the threads dependency - Store tests in dict - Add missing HAVE_* decls for functions - Remove unused cc_native variable - Make doxygen targets a dict - Make dot_gv a dict - Use dicts in man_pages - Make decls use dicts - Make generated_headers use dicts - Align Meson version number with autotool's Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr>