Using Kyua for TAP tests

16 views
Skip to first unread message

Johnny Lam

unread,
Apr 16, 2017, 3:21:37 PM4/16/17
to kyua-discuss
I'm using kyua-0.13nb1 from a current pkgsrc checkout on NetBSD-7.1 and kyua passed all of its own tests installed in /usr/pkg/tests/kyua.

Using this simple TAP output generator:

#/bin/sh
#   tap-test.sh
echo
"1..1"
echo
"ok 1"

And this Kyuafile:

syntax(2)
test_suite
("testsuite")
tap_test_program
{name="tap-test.sh"}

I get this when I execute "kyua test":

tap-test.sh:main  ->  broken: Received signal 6  [0.009s]

Results file id is home_jlam_test.20170416-191711-224983
Results saved to /home/jlam/.kyua/store/results.home_jlam_test.20170416-191711-224983.db

0/1 passed (1 failed)

I was expecting this simple example to work.  What am I doing wrong?

Johnny C. Lam

Julio Merino

unread,
Apr 16, 2017, 10:23:20 PM4/16/17
to kyua-d...@googlegroups.com
Hi Johnny,

Shouldn't the output of the program be:

1 ok

Instead of

ok 1

?

"kyua report --verbose" after the failed execution should give you more details.

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "kyua-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kyua-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Johnny Lam

unread,
Apr 16, 2017, 11:55:29 PM4/16/17
to kyua-discuss
Ah, this was an unfortunate and embarrassing copy-and-paste error on my part.  Everything is actually working correctly.

Regarding your question about TAP output, the testanything.org site says it should be "ok 1 description # directive".

Regards,

Johnny C. Lam

Ngie Cooper

unread,
Apr 17, 2017, 12:42:11 AM4/17/17
to kyua-d...@googlegroups.com

On Apr 16, 2017, at 20:55, Johnny Lam <jla...@gmail.com> wrote:

Ah, this was an unfortunate and embarrassing copy-and-paste error on my part.  Everything is actually working correctly.

Regarding your question about TAP output, the testanything.org site says it should be "ok 1 description # directive".

Hi Johnny,
    The TAP test protocol is unfortunately very unstructured and confusing if you look at just the TAP documentation.
    If you are set on using TAP (I recommend ATF--I'm going to start working on googletest soon for FreeBSD), I recommend running the test through "prove -v" first to verify its validity, then run it through kyua next.
    Please feel free to look at FreeBSD for examples (look for TAP_TESTS_SH, e.g., https://svnweb.freebsd.org/base/head/usr.sbin/newsyslog/tests/legacy_test.sh?revision=305011&view=markup). I've tried to make them as functional as possible with both TAP and kyua's interpretation of TAP (which tries to be as close to the "specification", but is not 100% there because of TAP's idiosyncrasies).
Thank you!
-Ngie
Reply all
Reply to author
Forward
0 new messages