HomeClusterLabs Projects

Feature: build: Add support for glib-based unit tests.

Description

Feature: build: Add support for glib-based unit tests.

This is largely, but not entirely, documented in the GLib docs:

https://developer.gnome.org/glib/unstable/glib-Testing.html#glib-Testing.description

The following changes are needed to make "make check" build and run
unit tests placed in the tests/ directory:

  • Add mk/glib-tap.mk. This makefile chunk will be included in tests/Makefile.am and interfaces between the automake TAP harness and glib. The glib docs encourage this to be added.
  • Add tests/tap-driver.sh and tests/tap-test. These are also part of the automake TAP harness and are also encouraged by the glib docs.
  • Add m4/glibtests.m4. This sets up several macros that glib-tap.mk assumes will exist and adds a couple ./configure options that we probably won't care about, but other people may assume are present. This then requires GLIB_TESTS to be called from configure.ac.

Details

Provenance
clumensAuthored on Jan 30 2020, 11:30 AM
Parents
rP161acb869a4e: Build: Move Makefile.common to mk/common.mk.
Branches
Unknown
Tags
Unknown

Event Timeline