Skip to content

Test harness re-design

Pekka Paalanen requested to merge pq/weston:mr/testharness into master

This rewrites the test harness internals and adds test program boilerplate to:

  • Move all remaining test configuration from meson.build file into the test .c files themselves to make the tests self-contained for easier setup, understanding, and running.
  • Stop using fork() in the test harness completely to make debugging easier, which means that
  • the Weston compositor is started with a direct function call to wet_main() instead of fork & exec, and the function returns when the compositor exits, and
  • client tests that need to run in parallel with the compositor are executed in a thread.
  • Add the concept of a fixture for setting up the compositor, and
  • allow repeating tests with multiple fixture configurations, e.g. running with Pixman-renderer and GL-renderer each.
  • Report (sub-)test results with TAP, though that is not taken advantage of yet.

Test harness documentation is added in the forms of prose in Sphinx and Doxygen comments, except for the client helpers which are untouched by this MR.

After this MR, you can execute any test you want by simply running its executable program from the build tests/ directory. That makes it even easier to run with GDB or Valgrind than with Meson wrappers.

This is to address #289 (closed).

Depends on: !290 (merged), !291 (merged), !310 (merged)

Latest documentation build

Edited by Pekka Paalanen

Merge request reports