make check: Add KYUADEBUG to target specific kyua tests#1976
make check: Add KYUADEBUG to target specific kyua tests#1976patmaddox wants to merge 1 commit intofreebsd:mainfrom
Conversation
|
Thank you for taking the time to contribute to FreeBSD! Some of files have special handling: Important @concussious wants to review changes to share/man/ Important @bsdimp @bapt @bdrewery @brooksdavis @emaste wants to review changes to share/mk |
3666c87 to
c5d99cc
Compare
share/mk/suite.test.mk
Outdated
|
|
||
| KYUA?= kyua | ||
|
|
||
| KYUA_CMD= ${KYUA} test -k ${DESTDIR}${TESTSDIR}/Kyuafile |
There was a problem hiding this comment.
I'd be tempted to move this to an .else branch, or construct it differently to highlight the differences better. Something like:
if !empty(KYUADEBUG)
KYUA_CMD_VERB=debug
KYUA_CMD_ARGS=${KYUADEBUG}
.endif
KYUA_CMD= ${KYUA} ${KYUA_CMD_VERB:Utest} -k ${DESTDIR}${TESTSDIR}/Kyuafile ${KYUA_CMD_ARGS}
Maybe that's not really an improvement, though.
There was a problem hiding this comment.
I like it. I wanted to communicate that test was default and I think yours does that more clearly. It also opens up more of kyua API. I added list and list -v.
Not sure when it makes sense to move from make vars to separate targets... but I get good mileage out of KYUADEBUG, and now KYUALIST_V looks nice.
Though these sorts of changes make me wonder: how do other people typically debug tests? I guess they must make install and then kyua debug from there?
kyua supports listing tests, optionally including metadata. It also
supports targeting a specific test in debug mode. It shows the
commands that were run, stdout / stderr, and details of the checks
that failed.
Examples:
make -C bin/ls check -DKYUALIST
make -C bin/ls check -DKYUALIST_V
make -C bin/ls check KYUADEBUG=ls_tests:T_flag
Signed-off-by: Pat Maddox <pat@patmaddox.com>
c5d99cc to
2aeb894
Compare
make check: Add make vars to list and debug kyua test cases
kyua supports listing tests, optionally including metadata. It also supports targeting a specific test in debug mode. It shows the commands that were run, stdout / stderr, and details of the checks that failed.
Examples:
(looks like I'm unable to edit the PR subject)