summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2014-01-01tests: Only run buffer-count test if we have at least mesa 10Kristian Høgsberg3-0/+30
https://bugs.freedesktop.org/show_bug.cgi?id=72835
2014-01-01build: Move clients libexec_PROGRAMS under BUILD_CLIENTS conditionalKristian Høgsberg2-3/+5
All the libexec programs are only built when BUILD_CLIENTS is true, so we can just assign libexec_PROGRAMS under the condition. This lets us drop most of the variable assignments and simplify it a bit. https://bugs.freedesktop.org/show_bug.cgi?id=72812
2013-12-07tests: Test whether a simple EGL main loop uses too many buffersNeil Roberts5-2/+215
This adds a test that tries to simulate a simple game loop that would be like this: while (1) { draw_something(); eglSwapBuffers(); } In this case the test is relying on eglSwapBuffers to throttle to a sensible frame rate. The test then verifies that only 2 EGL buffers are used. This is done via a new request and event in the wayland-test protocol. Currently this causes 3 buffers to be created because the release event generated by the swap buffers is not processed by Mesa until it blocks for the frame complete event in the next swap buffers call, but that is too late. This can be fixed in Mesa by issuing a sync request after the swap buffers and blocking on it before deciding whether to allocate a new buffer.
2013-12-02Remove the weston_view.geometry.width/height fieldsJason Ekstrand3-6/+9
This has a couple of additional implications for the internal weston API: 1) weston_view_configure no longer exists. Use weston_view_set_position instead. 2) The weston_surface.configure callback no longer takes a width and height. If you need these, surface.width/height are set before configure is called. If you need to know when the width/height changes, you must track that yourself.
2013-11-27Remove dependency on <GLES2/gl2.h> by replacing GLfloat with floatTomeu Vizoso1-6/+6
2013-11-24configure.ac: Make libdrm optional in weston-launchKristian Høgsberg1-0/+1
If libdrm is available, weston-launch and launcer-util.c will support getting the drm device and setting and dropping drm master, otherwise we'll only support getting input devices.
2013-11-23tests: Remove an unecessary Makefile.am variableKristian Høgsberg1-5/+3
2013-11-23tests: Use a helper library for weston-test clientsKristian Høgsberg1-32/+25
2013-11-23tests: Use TEST_CLIENT for test client modulesKristian Høgsberg1-1/+1
We abused SIMPLE_CLIENT_LIBS before, but if you disable simple clients, the test suite fails to link. Use test client specific variables instead. https://bugs.freedesktop.org/show_bug.cgi?id=71530
2013-11-21tests: .gitignore log filesPekka Paalanen1-0/+1
2013-11-21tests: allow weston test plugin to keep on runningPekka Paalanen1-1/+1
If the environment variable WESTON_TEST_CLIENT_PATH is not set, do not quit Weston in the test plugin. This allows one to start Weston with the test plugin manually, and then run any tests also manually, while observing Weston's behaviour over time. This is useful for: - Running a test multiple times and checking if Weston leaks (e.g. with Valgrind) - Running tests manually on a backend that is not x11 or wayland, especially the backends that require weston-launch, and therefore cannot be used with the 'make check' machinery. This change should not affect 'make check' behaviour, because there WESTON_TEST_CLIENT_PATH is always set. Cc: U. Artie Eoff <ullysses.a.eoff@intel.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-11-21tests: add a test causing SIGBUS to the compositorPekka Paalanen2-0/+81
This tests the wl_shm buffer access wrappers, that are supposed to catch the invalid accesses to a memory-mapped file beyond EOF. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-11-15protocol: move sub-surfaces to WaylandPekka Paalanen3-8/+1
This reverts commit 2396aec6842c709a714f3825dbad9fd88478f2e6. This exact version of the sub-surface protocol has been copied into Wayland core. Therefore it must be removed from here to avoid build conflicts and useless duplication. No other changes to sub-surface protocol consumers are needed, the identical API is now offered by libwayland-client and libwayland-server. The commit adding sub-surfaces to Wayland is: Author: Pekka Paalanen <pekka.paalanen@collabora.co.uk> protocol: add sub-surfaces to the core Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-11-13weston-test: Always update transform when moving surfaceKristian Høgsberg1-2/+1
weston_view_update_transform() will post damage in the old and new positions of the view and thus make sure we always repaint properly. In particular, in bug 66133, the test suite moves the surface off any output and weston_surface_schedule_repaint() in commit fails to do anything, since the surface is not on any output. After changing view geometry, we have to either call weston_compositor_schedule_repaint(), which is what shell.c typically does, though that repaints all outputs, or call weston_view_update_transform() to force update the transformation and queue repaints on affected outputs. https://bugs.freedesktop.org/show_bug.cgi?id=66133
2013-10-28tests/.gitignore: Add *.trsJonas Ådahl1-0/+1
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2013-10-22Split the geometry information from weston_surface out into weston_viewJason Ekstrand3-29/+47
The weston_surface structure is split into two structures: * The weston_surface structure storres everything required for a client-side or server-side surface. This includes buffers; callbacks; backend private data; input, damage, and opaque regions; and a few other bookkeeping bits. * The weston_view structure represents an entity in the scenegraph and storres all of the geometry information. This includes clip region, alpha, position, and the transformation list as well as all of the temporary information derived from the geometry state. Because a view, and not a surface, is a scenegraph element, the view is what is placed in layers and planes. There are a few things worth noting about the surface/view split: 1. This is *not* a modification to the protocol. It is, instead, a modification to Weston's internal scenegraph to allow a single surface to exist in multiple places at a time. Clients are completely unaware of how many views to a particular surface exist. 2. A view is considered a direct child of a surface and is destroyed when the surface is destroyed. Because of this, the view.surface pointer is always valid and non-null. 3. The compositor's surface_list is replaced with a view_list. Due to subsurfaces, building the view list is a little more complicated than it used to be and involves building a tree of views on the fly whenever subsurfaces are used. However, this means that backends can remain completely subsurface-agnostic. 4. Surfaces and views both keep track of which outputs they are on. 5. The weston_surface structure now has width and height fields. These are populated when a new buffer is attached before surface.configure is called. This is because there are many surface-based operations that really require the width and height and digging through the views didn't work well. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-10-22compositor: Remove redundant and not well-defined focus fieldKristian Høgsberg1-6/+0
It was never clear what this field really did.
2013-10-10weston-test-client-helper: Use wl_fixed_to_double() when printing axis valueKristian Høgsberg1-1/+2
2013-10-10weston-test-client-helper.c: Assert on failed allocationsKristian Høgsberg1-10/+19
2013-10-10tests: Assert surface creation succeedsKristian Høgsberg2-0/+2
2013-09-21config-parser: Make weston_config_parse() tkae a file nameKristian Høgsberg1-1/+1
Take a basename of the config file to parse instead of an fd.
2013-09-16Added tests for the vertex clipping code.Sam Spilsbury2-11/+245
This tests (via the table-driven testing method) that the correct number of vertices and also the correct vertices themselves are generated for an clip box and polygon of up to eight vertices. Also add a libshared-test.la so that we don't have to build weston-test-runner all the time
2013-09-13Add support for table-driven testing.Sam Spilsbury2-63/+112
The new TEST_P macro takes a function name and a "data" argument to point to an arbitrary array of known size of test data. This allows multiple tests to be run with different datasets. The array is stored as a void * but advanced by a known size on each iteration. The data for each invocation of the test is provided as a "data" argument, it is the responsibility of the test to cast it to something sensible. Also fixed single-test running to only run the tests specified
2013-09-13Remove AM_LDFLAGS usageSam Spilsbury1-2/+6
We are not building everything here as a module, only the test modules.
2013-09-11tests: list available tests if an invalid test name is givenPeter Hutterer1-0/+1
2013-09-11tests: support -h/--help for the testsPeter Hutterer1-0/+18
Including listing the tests available in that binary
2013-09-11tests: include config.h in weston-test-runnerPeter Hutterer1-0/+1
2013-09-11tests: use variable for test name in weston-tests-envPeter Hutterer1-5/+12
Slightly more readable and makes it easier to switch to use $2 for something in the future (if that's ever needed).
2013-09-11tests: always build testsPeter Hutterer1-8/+4
check_PROGRAMS and friends are only built during make check. Which is a great way of introducing compiler errors in tests. Always build them, TESTS defines what's being run during make check.
2013-08-26Add more missing config.h #includesKristian Høgsberg1-0/+2
Now that we use AC_SYS_LARGEFILE, we need to pull in config.h at least whereever we use mmap(). Fixes at least the test-suite and simple-shm on 32 bit systems.
2013-08-20autotools: Don't use wayland-scanner.m4Daiki Ueno1-1/+2
2013-08-08malloc + memset -> zallocPeter Hutterer1-2/+1
And for clients using the xmalloc helper, use xzalloc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-09Convert to wl_global_create/destroy()Kristian Høgsberg1-2/+2
2013-07-09tests: Fix warnings in config-parser-testKristian Høgsberg1-1/+2
2013-07-08tests: Move config-parser.test to tests/Quentin Glidic3-1/+214
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-07-08tests: Add .weston extension to clients testsQuentin Glidic2-25/+23
We can then add tests which do not use Weston in the test suite. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-07-04tests: Rename xwayland_test to xwayland-testKristian Høgsberg1-1/+1
Consitency.
2013-07-03tests: Fix leftover wl_client_add_versioned_object()Kristian Høgsberg1-4/+3
The search and replace missed this one.
2013-07-03Use wl_resource_create() for creating resourcesJason Ekstrand1-2/+4
This commit sets the version numbers for all added/created objects. The wl_compositor.create_surface implementation was altered to create a surface with the same version as the underlying wl_compositor. Since no other "child interfaces" have version greater than 1, they were all hard-coded to version 1. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-06-25tests: Fix direct access to resource->data in weston-testKristian Høgsberg1-7/+8
2013-05-17tests: add a sub-surface nesting loop testPekka Paalanen1-0/+22
It should not be possible to create a loop by nesting sub-surfaces. Currently Weston fails this test. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-17tests: add sub-surface tree destruction permutationsPekka Paalanen1-0/+202
Add a test for varying the object destruction order in a complex sub-surface tree. This test attemps to fuzz the destruction of a sub-surface tree to make sure the server does not crash on any wl_surface or wl_subsurface destruction sequence. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-17fix module_init signature in module testsU. Artie Eoff2-4/+2
surface-global-test and surface-test did not get updated to the new module_init(...) signature when it changed in a50e6e4c500e3080b8df7ec14c7e42741477a423. Thus, they failed to compile. Simply running 'make check' shows the problem. This patch fixes it. fixes https://bugs.freedesktop.org/show_bug.cgi?id=64691 Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2013-05-14config-parser: Honor XDG_CONFIG_DIRSOssama Othman1-1/+1
This set of changes adds support for searching for a given config file in the directories listed in $XDG_CONFIG_DIRS if it wasn't found in $XDG_CONFIG_HOME or ~/.config. This allows packages to install custom config files in /etc/xdg/weston, for example, thus allowing them to avoid dealing with home directories. To avoid a TOCTOU race the config file is actually open()ed during the search. Its file descriptor is returned and stored in the compositor for later use when performing subsequent config file parses. Signed-off-by: Ossama Othman <ossama.othman@intel.com>
2013-05-10tests: add sub-surface protocol testsPekka Paalanen3-1/+330
For testing the protocol behaviour only: - linking a surface to a parent does not fail - position and placement requests do not fail - bad linking and arguments do fail - passing a surface as a sibling from a different set fails - different destruction sequences do not crash - setting a surface as its own parent fails - nesting succeeds Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-10protocol: add sub-surfacesPekka Paalanen2-0/+6
Add protocol for sub-surfaces, wl_subcompositor as the global interface, and wl_subsurface as the per-surface interface extension. This patch is meant to be reverted, once sub-surfaces are moved into Wayland core. Changes in v2: - Rewrite wl_subcompositor.get_subsurface description, and move mapping and commit details into wl_subsurface description. Check the wording in wl_subsurface.set_position description. - Add wl_subsurface.set_commit_mode request, and document it, with the commit_mode enum. Add bad_value error code for wl_subsurface. - Moved the protocol into Weston repository so we can land it upstream sooner for public exposure. It is to be moved into Wayland core later. - Add destroy requests to both wl_subcompositor and wl_subsurface, and document them. Experience has showed, that interfaces should always have a destructor unless there is a good and future-proof reason to not have it. Changes in v3: - Specify, that wl_subsurface will become inert, if the corresponding wl_surface is destroyed, instead of requiring a certain destruction order. - Replaced wl_subsurface.set_commit_mode with wl_subsurface.set_sync and wl_subsurface.set_desync. Parent-cached commit mode is now called synchronized, and independent mode is desynchronized. Removed commit_mode enum, and bad_value error. - Added support for nested sub-surfaces. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-07input: Merge wl_seat into weston_seatKristian Høgsberg1-3/+3
2013-05-06input: Rename wl_pointer to weston_pointerKristian Høgsberg1-2/+2
This is now a weston object.
2013-05-06fold wl_keyboard into weston_keyboardKristian Høgsberg1-1/+1
2013-05-02text: Rename text_input to wl_text_inputJan Arne Petersen1-25/+25
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>