1. 30 Jan, 2020 1 commit
  2. 22 Nov, 2019 1 commit
    • Pekka Paalanen's avatar
      tests: replace fprintf() with testlog() · 12a138d5
      Pekka Paalanen authored
      When we move on to TAP, stdout will be reserved for TAP and stderr is for free
      chatter. Set up an example that tests should use testlog() instead of fprintf
      or printf to chat in the right place.
      Most statements were already printing to stderr, so this just makes then a
      little shorter. There are also some statements that printed to stdout and are
      now corrected.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
  3. 21 Nov, 2019 1 commit
  4. 29 Jun, 2016 1 commit
    • Pekka Paalanen's avatar
      tests: introduce struct buffer for client-helper · 924cd948
      Pekka Paalanen authored
      We are growing more tests that need to handle buffers, both just images
      and wl_buffers. Particularly the screenshooting facility needs these.
      Currently everything is in struct surface, which contains more than we
      need. It is a bit messy.
      Create a new struct buffer to encapsulate the image representation, the
      wl_buffer, and enough information to tear it all down (munmap) so we
      don't have to leak everything. Some tests might start doing things in
      loops, and leaking would accumulate.
      Instead of inventing our own image representation, use pixman_image_t.
      It is a well-tested library worth using, and we already rely on it in
      other places.
      This makes the tests depend on Pixman, which requires the fix for
      building buffer-count, which would otherwise not find pixman.h.
      The new create_shm_buffer_a8r8g8b8() creates an image with an explicit
      format, and pixman_image_t keeps track of it. And stride and size and
      data. This implementation is still a little hacky due to calling
      A very new thing is buffer_destroy(). Previously we didn't really free
      any buffers. It is not a problem when the process will exit soon anyway,
      but it may become a problem if tests start iterating things.
      Manual memset() on a image is converted to a pixman action, just to show
      how to do it properly with pixman.
      Stride and pixel format assumptions still linger all around, but those
      are for another patch.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
  5. 09 Jun, 2016 1 commit
    • Pekka Paalanen's avatar
      tests: add wp_viewporter tests · 82d95a6d
      Pekka Paalanen authored
      These tests poke the viewporter interface to ensure proper behaviour
      from client perspective, without testing the rendering result.
      These cases are covered:
      - create viewport twice
      - source rectangle invalid value errors, and unset
      - destination size invalid value errors, and unset
      - source causing non-integer destination size
      - source inside/outside of buffer with transform, scale
      - source outside NULL buffer, then getting real buffer
      - source outside NULL buffer with inherited NULL
      - set_source, set_destination, and destroy after the wl_surface is
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: default avatarBryce Harrington <bryce@osg.samsung.com>