Tool to test dist-tuple for regressions. It prints the variables created by dist-tuple.port.mk in OpenBSD's /usr/ports/infrastructure/mk/ for selected ports or all that use DIST_TUPLE. A custom dist-tuple.port.mk can be passed as DT_MK. This way the output with 2 different such files can be compared for regressions.
dist-tuple.test uses sqlports(5) for the different uses of DIST_TUPLE in the ports tree. It loads nothing other than dist-tuple.port.mk and its dependencies. The goal is to provide a time-saving way to check for regressions with updates to dist-tuple.port.mk that doesn't depend on running a bulk(8) build.
The output contains the values of all variables for the templates and each port. Template variables:
- SITES.template
- TEMPLATE_DISTFILESi.template
- EXTRACT_SUFX.template
- TEMPLATE_HOMEPAGE
(Note that the template variables contain several place holders like <project> that are used to build the specific data for each DIST_TUPLE entry.)
Variables generated for each port:
- DIST_TUPLE
- DISTNAME
- _DT_WRKDIST
- HOMEPAGE
- EXTRACT_SUFX.template
- DISTFILES.template
- MODDIST-TUPLE_post-extract (the command to move the extracted files into a specific directory)
# pkg_add sqlports
Check output for all ports that use DIST_TUPLE:
$ make
Check output for 2 ports (devel/gtest and archivers/heatshrink):
$ make PORTS="devel/gtest archivers/heatshrink"
Create output with default and updated dist-tuple.port.mk and compare for regressions:
$ make > /tmp/dt-test1.txt
$ make DT_MK=/tmp/dist-tuple.port.mk.update > /tmp/dt-test2.txt
$ diff -u /tmp/dt-test1.txt /tmp/dt-test2.txt