Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jul 2014 10:11:48 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        Fabian Keil <freebsd-listen@fabiankeil.de>
Cc:        "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>
Subject:   Re: Missing atf-check output: example:failing_test -> failed: atf-check failed; see the output of the test for details
Message-ID:  <CAOtMX2i6ziW%2BWqQ2jcRWNesNOFbiat2psEi8bvb0qTb2=93ukg@mail.gmail.com>
In-Reply-To: <450da50a.02ce9897@fabiankeil.de>
References:  <5ee51891.12b049e9@fabiankeil.de> <CAOtMX2j=NMyacDw8gV=N7eS07G5SJ_bL=ktPDDHVGC7QFc9M9A@mail.gmail.com> <450da50a.02ce9897@fabiankeil.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 26, 2014 at 2:58 AM, Fabian Keil
<freebsd-listen@fabiankeil.de> wrote:
> Alan Somers <asomers@freebsd.org> wrote:
>
>> On Fri, Jul 25, 2014 at 12:55 PM, Fabian Keil
>> <freebsd-listen@fabiankeil.de> wrote:
>> > I'm currently evaluating using kyua to test a FreeBSD-specific
>> > shell script, however I'm having trouble analysing failing tests.
> [...]
>> > I get:
>> >
>> > | fk@r500 ~/git/zogftw/tests $kyua --loglevel debug test -k Kyuafile example:failing_test
>> > | example:failing_test  ->  failed: atf-check failed; see the output of the test for details  [0.150s]
>> > |
>> > | 0/1 passed (1 failed)
>> > | Committed action 21
>> >
>> > The test failure obviously is expected, but I'm missing the referenced
>> > "output of the test". The relevant log excerpt:
> [...]
>> > I'm looking for something like this:
>> >
>> > | fk@r500 ~ $/usr/local/libexec/atf-check -s exit:1 -o empty -e empty 'true'
>> > | Executing command [ true ]
>> > | Fail: incorrect exit status: 0, expected: 1
>> > | stdout:
>> > |
>> > | stderr:
>> > |
>> >
>> > I didn't read all the docs available yet and I may be missing something,
>> > but seeing test failures is something I'd expect to work out of the box.
>> > Can someone familiar with kyua confirm that this is working as expected?
>
>> The test output is stored in Kyua's sqlite database.  There are two
>> ways to see it:
>> 1) Run " kyua report-html"
>> 2) Sometimes its easier just to rerun the testcase in debug mode.  Do
>> "kyua debug example:failing_test"
>
> Thanks a lot.
>
> Not showing test failures on the cli by default seems like a strange
> design decision to me, but I guess I'll get used to it or write a
> wrapper script that calls kyua debug for all tests.


I don't recommend calling "kyua debug" for all tests.  The best
approach is to run "kyua test; kyua report-html <options>".  The HTML
report will show you the full stdout and stderr output of each failing
test case.


>
> Fabian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2i6ziW%2BWqQ2jcRWNesNOFbiat2psEi8bvb0qTb2=93ukg>