user options for regression-test?

Anton Shterenlikht mexas at
Sun Nov 28 01:18:18 UTC 2010

I'm trying to add regression tests to my port. 
The tests can be run with various levels of
verbosity of output. I'd like to let the
user to choose the verbosity for tests.

At present I've this:

regression-test check test: build
        @${ECHO_CMD} "Testing static SLATEC library."
        @${ECHO_CMD} "******* Default print verbosity level is 0.\
                Change in Makefile if required."
        ${ECHO_CMD} 0 > ${WRKDIR}/.printlevel
        ${MAKE} -C ${WRKDIR}

The verbosity is a number 0,1,2 or 3, which
I write to a file. The tests then read this file.

Is this acceptable?
Is there a better way?
Can OPTIONS be used under regression-test target?
Or maybe it's best to add a variable, something like

.if ! defined(PRINT_LEVEL)
        @${ECHO_CMD} "******* Default print verbosity level is 0"

and then use PRINT_LEVEL in test routines?

many thanks


Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423

More information about the freebsd-ports mailing list