summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: test set for ivi-screen normal use case in server sideNobuhiko Tanibata2015-06-251-1/+104
| | | | | | | | | | | | | These tests are implemented on test suite framework, which provides internal method validation. Following features are tested, - ivi-screen id - ivi-screen resolution - render order of ivi-layers in ivi-screen Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
* tests: test set for ivi-layer with bad condition in server sideNobuhiko Tanibata2015-06-251-0/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests are implemented on test suite framework, which provides internal method validation. Following features are tested for ivi-layer, - create with bad parameter - visibility with bad parameter - opacity with bad parameter - destination rectangle with bad parameter - orientation with bad parameter - dimension with bad parameter - position with bad parameter - source rectangle with bad parameter - properties with bad parameter - destroy ivi-layer and call set_visibility_commit_changes - destroy ivi-layer, call set_opacity, and commit_changes - destroy ivi-layer, call set_orientation, and commit_changes - destroy ivi-layer, call set_dimension, and commit_changes - call set_position, destroy ivi-layer, and commit_changes - call set_source_rectangle, destroy ivi-layer, and commit_changes - call set_destination_rectangle, destroy ivi-layer, and commit_changes - create duplicate - destroy ivi-layer and call get_layer Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
* tests: test set for ivi-layer bad condition with helper-clientNobuhiko Tanibata2015-06-252-0/+163
| | | | | | | | | | | | These tests are implemented on test suite framework, which provides helper client. Following features are tested, - bad render order of ivi-surface on ivi-layer - call commitchanges after a ivi_surface in render order is destoryed Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
* tests: test set for ivi-layer normal use case in server sideNobuhiko Tanibata2015-06-251-0/+277
| | | | | | | | | | | | | | | | | | These tests are implemented on test suite framework, which provides internal method validation. Following features are tested for ivi-layer, - create - visibility - opacity - orientation - dimension - position - destination rectangle - source rectangle Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
* tests: test set for ivi-layer normal use case with helper clientNobuhiko Tanibata2015-06-253-0/+73
| | | | | | | | | | | These test are implemented on test suite framework, which provides helper client. Following features are tested, - render order of ivi-surfaces on ivi-layer Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
* tests: test set for ivi-surface with bad condition in server sideNobuhiko Tanibata2015-06-251-0/+74
| | | | | | | | | | | | | | | | These tests are implemented on test suite framework, which provides internal method validation. Following features are tested for ivi-surface, - destination_rectangle with bad parameter - orientation with bad parameter - dimension with bad parameter - position with bad parameter - source_rectangle with bad parameter - properties with bad parameter Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
* tests: test set for ivi-surface bad condition with helper clientNobuhiko Tanibata2015-06-252-0/+207
| | | | | | | | | | | | | | | | | | | | | | | These tests are implemented on test suite framework, which provides helper client. Following features are tested, - ivi_layout_runner with basic_test_names[] - surface with bad opacity - destroy ivi/wl_surface and call get_surface - commit_changes_after_properties_set_surface_destroy with surface_property_commit_changes_test_names[] - call set_visibility, destroy ivi-surface, and commit_changes - call set_opacity, destroy ivi-surface, and commit_changes - call set_orientation, destroy ivi-surface, and commit_changes - call set_dimension, destroy ivi-surface, and commit_changes - call set_position, destroy ivi-surface, and commit_changes - call set_source_rectangle, destroy ivi-surface, and commit_changes - call set_destination_rectangle, destroy ivi-surface, and commit_changes Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
* tests: test set for ivi-surface normal use case with helper clientNobuhiko Tanibata2015-06-252-13/+211
| | | | | | | | | | | | | | | These tests are implemented on test suite framework, which provides helper client. Following features are tested for ivi-surface - orientation - dimension - position - destination rectangle - source rectangle Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
* Unified multiple definitions of container_of() macro.Jon Cruz2015-06-152-0/+3
| | | | | | | | | Removed duplicate definitions of the container_of() macro and refactored sources to use the single implementation. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* Moved helper macro to a discrete include file.Jon Cruz2015-06-154-2/+5
| | | | | | | | | | | To help reduce code duplication and also 'kitchen-sink' includes the ARRAY_LENGTH macro was moved to a stand-alone file and referenced from the sources consuming it. Other macros will be added in subsequent passes. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* Remove redundant #include path component.Jon Cruz2015-06-1510-13/+13
| | | | | | | | | Using the parent '../' path component in #include statements makes the codebase more rigid and is redundant due to proper -I use. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* tests: Update boilerplate from MIT X11 license to MIT Expat licenseBryce Harrington2015-06-1529-464/+551
|
* internal-screenshot-test: Fix endian problemDerek Foreman2015-06-041-5/+8
| | | | | | | Use bit-shifts to properly generate pixel data. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Revert "gitignore: Ignore generated header test files"Bryce Harrington2015-05-261-3/+0
| | | | This reverts commit 8267056a6477e3517b974bc1d33d275365c43ec6.
* tests: Drop redundant debug outputBryce Harrington2015-05-261-1/+0
| | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
* gitignore: Ignore generated header test filesBryce Harrington2015-05-261-0/+3
|
* tests/internal-screenshot: Fix test so it doesn't expect shell surfacesDerek Foreman2015-05-263-14/+49
| | | | | | | | We no longer have a race with shell startup because we create our own colored surface and check that it's properly drawn. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: Set up the reference image environment variableDerek Foreman2015-05-221-0/+4
| | | | | | | | | make check failed for out of tree builds because we didn't set up WESTON_TEST_REFERENCE_PATH in weston-tests-env Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Tested-by: Bryce Harrington <bryce@osg.samsung.com>
* tests: cleanup whitespaceBryce Harrington2015-05-211-6/+6
|
* tests: Check that the PNG file's stride matches our internal assumptionBryce Harrington2015-05-211-0/+10
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Fix code style on path/filename routinesBryce Harrington2015-05-211-4/+8
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Add capture_screenshot_of_output()Bryce Harrington2015-05-211-21/+35
| | | | | | | | | | | Provides a convenience function for JFDI grabbing of a single screenshot. Tests that are doing multiple screenshots or other fanciness probably will bypass this routine and do things more manually, but this'll provide a reference implementation. And hopefully there'll be enough simple cases that this actually is useful. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Add check_surfaces_geometry()Bryce Harrington2015-05-212-13/+30
| | | | | | | | Minor refactoring to simplify initial sanity checks of surfaces. Conceivably useful for other basic checking. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Add load_surface_from_png()Bryce Harrington2015-05-211-16/+56
| | | | | | | | Loads an image from disk via cairo, and copies data into a weston test surface for internal use. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Add create_screenshot_surface()Bryce Harrington2015-05-211-10/+27
| | | | | | | Refactor out the screenshot shm buffer creation code. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Add write_surface_as_png() helperBryce Harrington2015-05-211-14/+32
| | | | | | | And use the helper routine for generating the output filename. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Add internal test for the weston test screenshot capabilityBryce Harrington2015-05-213-0/+147
| | | | | | | | | | | | This also serves as a proof of concept of the screen capture functionality and as a demo for snapshot-based rendering verification. Implements screenshot saving clientside in the test itself. This also demonstrates use of test-specific configuration files, in this case to disable fadein animations and background images. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Handle screenshot done event in weston-testBryce Harrington2015-05-212-0/+11
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Add screenshot recording capability to weston-testBryce Harrington2015-05-211-0/+243
| | | | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=83981 Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Support --config to enable tests to override config defaultsBryce Harrington2015-05-211-2/+12
| | | | | | | | | | | | Implements a simple mechanism to allow tests to customize the configuration. For a given <name>-test.c just place a <name>.ini file at the same location as the test itself. Alternately, you can generate a <name>.ini in the same directory that the compiled test is placed (i.e. the top builddir). If no configuration file is found, then no configuration will be used (i.e. --no-config is specified.) Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Add surface checksBryce Harrington2015-05-212-0/+101
| | | | | | | | | Introduce helper routines for testing surfaces against specific conditions. These allow tests to validate screen captures as displaying the correct rendering results. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Add an xmalloc helper functionBryce Harrington2015-05-212-6/+21
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Add client helper routines for output and reference filenamesBryce Harrington2015-05-212-0/+44
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Add error handling for system callsBryce Harrington2015-05-211-2/+2
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
* tests: Fix Samsung copyright assignment on xwayland testBryce Harrington2015-05-051-1/+1
|
* tests: fix typoDerek Foreman2015-05-021-1/+1
| | | | Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
* tests: add ivi_layout stand-alone test modulePekka Paalanen2015-04-091-0/+121
| | | | | | | | | | This is the ivi_layout stand-alone test controller module that does not require any clients to run. Therefore it is much simpler than ivi_layout-test-plugin.c and does not need a matching part in ivi_layout-test.c. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* tests: ivi_layout test infrastructurePekka Paalanen2015-04-094-0/+645
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testing the ivi_layout API requires two things: - the tests must be written as a controller module to access the API - the tests need a helper client to create some objects that can then be managed via the API This patch adds all the infrastructure and two different kinds of example tests. Internal ivi-shell (ivi_layout) API tests are listed as ivi-*.la files in TESTS in Makefile.am. Weston-tests-env detects these, and runs Weston with ivi-shell, and loads the given module as a controller module, not as a normal plugin. The test controller module ivi-*.la will launch a helper client. For ivi-layout-test.la the helper client is ivi-layout.ivi. The helper client uses the weston-test-runner framework to fork and exec each TEST with a fresh connection to the compositor. The actual test is triggered by the weston_test_runner protocol interface, a new addition to weston-test.xml. The helper client uses weston_test_runner to trigger a test, and the server side of the interface is implemented by the test controller module (ivi-layout-test.la). The server side of weston_test_runner uses the same trick as weston-test-runner.h to gather a list of defined tests. A test is defined with the RUNNER_TEST macro. If a test defined by RUNNER_TEST succeeds, an event is sent to the helper client that it can continue (or exit). If a test fails, a fatal protocol error is sent to the helper client. Once the helper client has iterated over all of its tests, it signals the batch success/failure via process exit code. That is cought in the test controller module, and forwarded as Weston's exit code. In summary: each ivi_layout test is a combination of a client side helper/setup and server side actual tests. v2: Load weston-test.so, because create_client() needs it. v3: add a comment about IVI_TEST_SURFACE_ID_BASE. v4: Rebased to upstream weston-tests-env changes. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> (v2)
* tests: add a basic ivi-shell testPekka Paalanen2015-04-092-0/+86
| | | | | | | | | | | This simply tests that Weston starts with ivi-shell, and ivi_application is present. Changes in v3: - Rebased to upstream weston-tests-env changes. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> (v2)
* tests: Prefer bracket form of test command for consistencyBryce Harrington2015-04-071-4/+2
| | | | | | | Also use variable default assignment to eliminate an if clause Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: Cleanup test log filenamesBryce Harrington2015-04-071-2/+2
| | | | | | | | | | | | | | | | The log files were being named like: surface-global-test.la-log.txt surface-global-test.la-serverlog.txt surface-test.la-log.txt surface-test.la-serverlog.txt text.weston-log.txt text.weston-serverlog.txt For consistency, omit the test filename's extension (.la/.so). Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
* tests: Keep track of basenameBryce Harrington2015-04-071-8/+9
| | | | | | | | | | | | | | basename returns the filename without path information (but with the file extension). We can get this more efficiently via shell variables. Also, for the socket name, use the test's name without the file extension. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> [Pekka: rebased without "tests: Support --config to enable tests to override config defaults".]
* tests: rename client_create to create_client_and_test_surfacePekka Paalanen2015-04-0212-41/+41
| | | | | | | | | A more descriptive name to not be confused with create_client(). v2: Rebased: fix also devices-test.c. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
* tests: introduce create_client()Pekka Paalanen2015-04-022-3/+17
| | | | | | | | | | | | | Introduce a new helper create_client(), which creates and initializes the client struct, but does not create a wl_surface. This will be useful for ivi-shell tests. v2: Rebased, and restored the dependency to weston-test.so, since seat handling requires it. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
* tests: add tests for devices handlingMarek Chalupa2015-03-311-0/+308
| | | | | | | | | | | | | | | Test misc races when adding/releasing devices v2.: use one roundtrip after releasing devices add touch support v3.: remove useless checks add few comments repeat tests 30 times instead of 100 times (it took too long, 30 is enough) Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: implement touch in test-helpersMarek Chalupa2015-03-312-0/+92
| | | | | | | | | | Let the client bind to wl_touch. Since we have our own seat, we know that the compositor will have wl_touch capability. v2: rebased due to changes in previous commit Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: use special seatMarek Chalupa2015-03-313-19/+85
| | | | | | | | | | | | | | | When running on different backends, we don't know what devices the backend provides. Create new seat for tests that contains everything what we need. This is also first step in adding touch support for tests. v2: do not add devices in wl_seat.name event. Collect first all wl_seats and then pick the one that we need and destroy the rest. The effect is the same, but this code is better understandable. Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: fix handling globalsMarek Chalupa2015-03-312-6/+63
| | | | | | | | | | | We used hard-coded version 1 for all globals. For testing newer methods and events we need use the current version of global. This patch fixes this and adds missing event handlers (for the events that were added in versions > 1) Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* weston-test: add device_{release/add} into protocolMarek Chalupa2015-03-311-0/+41
| | | | | | | | | | This request simulates device creation/destruction from evdev (libinput) v2: added support for touch. Touch is not supported yet, but better be prepared Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: use MODDIR in weston-tests-envPekka Paalanen2015-03-271-7/+8
| | | | | | | | | | | Make a little short-hand for the module directory. This also cleans up the redefinition of BACKEND in the script. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk> Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>