1. 30 Jan, 2020 11 commits
    • Pekka Paalanen's avatar
      tests: migrate client tests · 701676d8
      Pekka Paalanen authored
      This migrates all the client tests that have nothing special in them to the new
      test harness.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Pekka Paalanen's avatar
      tests: migrate devices · 3fb67936
      Pekka Paalanen authored
      The devices test was actually using the defaults instead of
      weston-test-desktop-shell in meson.build, so this patch keeps it that way.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Pekka Paalanen's avatar
      meson: remove tests_weston_plugin · af18eb0b
      Pekka Paalanen authored
      All plugin tests have been converted to the new harness, so the old definition
      can be removed.
      The one remaining test surface-screenshot is a manual test, the plugin only
      installs a debug key binding. Hence it is open-coded as a normal plugin, not as
      a test.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Pekka Paalanen's avatar
      tests: migrate surface, surface-global · 99c536db
      Pekka Paalanen authored
      These are normal plugin tests, moved to the new harness.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Pekka Paalanen's avatar
    • Pekka Paalanen's avatar
      tests: migrate ivi-shell-app · 431ec067
      Pekka Paalanen authored
      Moving to the new test harness.
      Carrying the test ini file still just to keep it the same even though I
      accidentally noticed the test succeeds also with --no-config.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Pekka Paalanen's avatar
      tests: migrate ivi-layout-internal · ad1a4102
      Pekka Paalanen authored
      Moving to the new harness.
      It would be possible to convert every case here into a separate PLUGIN_TEST,
      but I did not see the value in that at this time.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Pekka Paalanen's avatar
      tests: migrate ivi-layout-test · 7f840b72
      Pekka Paalanen authored
      The ivi-layout-test comprises of two halves: the client and the plugin. This
      migrates the test to the new test harness.
      In the old harness, the plugin was built as the test in meson.build and it fork
      & exec'd the client part. In the new harness client tests start from the client
      program which sets up the compositor in-process, so now the client is built as
      the test in meson.build and the plugin is just an additional file.
      Therefore there is not need for the plugin for fork & exec anything anymore, so
      all that code is removed.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Pekka Paalanen's avatar
      tests: migrate string and vertex-clip · 57a4508e
      Pekka Paalanen authored
      These are the only remaining standalone non-ZUC tests. They do not need any
      changes to be built with the new harness - in fact they have already been
      running through the new harness.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Pekka Paalanen's avatar
      tests: stop relying on environment in the new harness · 82dd6ce8
      Pekka Paalanen authored
      Instead of relying on Meson setting up environment so that Weston and tests
      find all their files, build those values into the tests. This way one can
      execute a test program successfully wihtout Meson, simply by running it.
      The old environment variables are still honoured if set. This might change in
      the future.
      Baking the source or build directory paths into the tests should not regress
      reproducible builds, because the binaries where test-config.h values are used
      will not be installed.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Pekka Paalanen's avatar
      tests: thread-based client harness · babb3b3b
      Pekka Paalanen authored
      This replaces the old test harness with a new one.
      The old harness relied on fork()'ing each test which makes tests independent,
      but makes debugging them harder. The new harness runs client code in a thread
      instead of a new process. A side-effect of not fork()'ing anymore is that any
      failure will stop running a test series short. Fortunately we do not have any
      tests that are expected to crash or fail.
      The old harness executed 'weston' from Meson, with lots of setup as both
      command line options and environment variables. The new harness executes
      wet_main() instead: the test program itself calls the compositor main function
      to execute the compositor in-process. Command line arguments are configured in
      the test program itself, not in meson.build. Environment variables aside, you
      are able to run a test by simply executing the test program, even if it is a
      plugin test.
      The new harness adds a new type of iteration: fixtures. For now, fixtures are
      used to set up the compositor for tests that need a compositor. If necessary, a
      fixture setup may include a data array of arbitrary type for executing the test
      series for each element in the array. This will be most useful for running
      screenshooting tests with both Pixman- and GL-renderers.
      The new harness outputs TAP formatted results into stdout. Meson is not
      switched to consume TAP yet though, because it would require a Meson version
      requirement bump and would not have any benefits at this time. OTOH outputting
      TAP is trivial and sets up a clear precedent of random test chatter belonging
      to stderr.
      This commit migrates only few tests to actually make use of the new features:
      roles is a basic client test, subsurface-shot is a client test that
      demonstrates the fixture array, and plugin-registry is a plugin test. The rest
      of the tests will be migrated later.
      Once all tests are migrated, we can remove the test-specific setup from
      meson.build, leaving only the actual build instructions in there.
      The not migrated tests and stand-alone tests suffer only a minor change: they
      no longer fork() for each TEST(), otherwise they keep running as before.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
  2. 27 Jan, 2020 1 commit
  3. 24 Oct, 2019 3 commits
    • Pekka Paalanen's avatar
      tests: surface-screenshot needs libshared · 9722ac62
      Pekka Paalanen authored
      surface-screenshot-test.c uses file_create_dated() provided by libshared, so it
      needs to link libshared.
      This was not a problem when unresolved symbols during build were allowed and
      the symbols was provided by the weston executable which accidentally exported
      all libshared symbols. This would become a problem when we disallow unresolved
      symbols project-wide, so fix it.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Pekka Paalanen's avatar
      Link Weston plugins to libexec-weston.so · 8e7f9501
      Pekka Paalanen authored
      All these plugins use symbols that were exported by the weston executable and
      are now exported by libexec-weston.so. Linking these to libexec-weston.so fixes
      unresolved symbols.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Pekka Paalanen's avatar
      build: separate deps for int and ext libweston users · 71ff95a5
      Pekka Paalanen authored
      We have two kinds of libweston users: internal and external. Weston, the
      frontend, counts as an external user, and should not have access to libweston
      private headers. The shell plugins are external users as well, because we
      intend people to be able to write them. Renderers, backends, and some plugins
      are internal users who will need access to private headers.
      Create two different Meson dependency objects, one for each kind.
      This makes it less likely to accidentally use a private header.
      Screen-share is a Weston plugin and therefore counts as an external user, but
      it needs the backend API to deliver input. Until we are comfortable exposing
      public API for that purpose, let it use internal headers.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
  4. 04 Oct, 2019 2 commits
    • Pekka Paalanen's avatar
      build: simplify include_directories · 4f5e3601
      Pekka Paalanen authored
      Define common_inc which includes both public_inc and the project root directory.
      The project root directory will allow access to config.h and all the shared/
      Replacing all custom '.', '..', '../..', '../shared' etc. include paths with
      common_inc reduces clutter in the target definitions and enforces the common
       #include directive style, as e.g. including shared/ headers without the
      subdirectory name no longer works.
      Unfortunately this does not prevent one from using private libweston headers
      with the usual include pattern for public headers.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Pekka Paalanen's avatar
      build: use dependency for matrix.c · b6c7a302
      Pekka Paalanen authored
      matrix.c needs to be built differently for a test program vs. everything else,
      so it cannot be in a helper lib. Instead, make a dependency object for it for
      easy use which always gets all the paths correct automatically.
      Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
  5. 16 May, 2019 1 commit
  6. 18 Apr, 2019 3 commits
  7. 15 Feb, 2019 2 commits
  8. 06 Feb, 2019 2 commits
    • Alexandros Frantzis's avatar
      tests: Add tests for per commit zwp_buffer_release_v1 behavior · c715c750
      Alexandros Frantzis authored
      Add tests to check that the zwp_buffer_release_v1 events are emitted per
      surface commit.
      To be able to test this we need to use a renderer that holds the buffer
      until the next buffer is committed, hence we use the pixman renderer.
      Changes in v7:
        - Remove references to obsolete noop-hold renderer.
      Changes in v5:
        - Meson support.
      Changes in v4:
        - Use the pixman renderer instead of the (now gone) noop-hold
      Signed-off-by: Alexandros Frantzis's avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
    • Alexandros Frantzis's avatar
      libweston: Introduce zwp_linux_explicit_synchronization_v1 · 27d7c395
      Alexandros Frantzis authored
      Introduce support for the zwp_linux_explicit_synchronization_unstable_v1
      protocol with an implementation of the zwp_linux_explicit_synchronization_v1
      Explicit synchronization provides a more versatile notification
      mechanism for buffer readiness and availability, and can be used to
      improve efficiency by integrating with related functionality in display
      and graphics APIs.
      In addition, the per-commit nature of the release events provided by
      this protocol potentially offers a solution to a deficiency of the
      wl_buffer.release event (see
      Support for this protocol depends on the capabilities of the backend, so
      we don't register it by default but provide a function which each
      backend will need to call. In this commit only the headless backend when
      using the noop renderer supports this to enable testing.
      Note that the zwp_surface_synchronization_v1 interface, which contains
      the core functionality of the protocol, is not implemented in this
      commit. Support for it will be added in future commits.
      Changes in v7:
        - Added some information in the commit message about the benefits of
          the explicit sync protocol.
      Changes in v6:
        - Fall back to advertising minor version 1 of the explicit sync protocol,
          although we support minor version 2 features, until the new
          wayland-protocols version is released.
      Changes in v5:
        - Meson support.
        - Advertise minor version 2 of the explicit sync protocol.
      Changes in v4:
        - Enable explicit sync support in the headless backend for all
      Changes in v3:
        - Use wl_resource_get_version() instead of hardcoding version 1.
        - Use updated protocol interface names.
        - Use correct format specifier for resource id.
        - Change test name to 'linux-explicit-synchronization.weston'
      Changes in v2:
        - Move implementation to separate file so protocol can be registered
          on demand by backends.
        - Register protocol in headless+noop backend for testing purposes.
      Signed-off-by: Alexandros Frantzis's avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
  9. 09 Jan, 2019 2 commits
  10. 07 Jan, 2019 1 commit
    • Pekka Paalanen's avatar
      tests: remove remnants of buffer-count test · 91bf16be
      Pekka Paalanen authored
      The buffer-count test was added in
      40c0c3f9 and removed in
      , but the removal left around
      the dependency to EGL headers in weston-test.c.
      Removal of those unneeded includes allows us to drop the EGL dependency
      completely from weston-test.c build.
      For the Meson build this means that there are no dependency('egl')
      directives anymore without the user friendly error message.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pq@iki.fi>
  11. 20 Dec, 2018 1 commit
  12. 09 Dec, 2018 1 commit
    • Daniel Stone's avatar
      Add Meson build system · 8011b0fa
      Daniel Stone authored
      Meson is a build system, currently implemented in Python, with multiple
      output backends, including Ninja and Make. The build file syntax is
      clean and easy to read unlike autotools. In practise, configuring and
      building with Meson and Ninja has been observed to be much faster than
      with autotools. Also cross-building support is excellent.
      More information at http://mesonbuild.com
      Since moving to Meson requires some changes from users in any case, we
      took this opportunity to revamp build options. Most of the build options
      still exist, some have changed names or more, and a few have been
      dropped. The option to choose the Cairo flavour is not implemented since
      for the longest time the Cairo image backend has been the only
      recommended one.
      This Meson build should be fully functional and it installs everything
      an all-enabled autotools build does. Installed pkg-config files have
      some minor differences that should be insignificant. Building of some
      developer documentation that was never installed with autotools is
      It is expected that the autotools build system will be removed soon
      after the next Weston release.
      Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      Co-authored-by: Pekka Paalanen's avatarPekka Paalanen <pq@iki.fi>
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pq@iki.fi>