From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | location reporting in TAP test failures |
Date: | 2018-06-05 15:28:40 |
Message-ID: | 85dc0a81-0f35-272f-2126-be2253fa0898@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Right now, when a TAP test reports a failure, it looks something like this:
# Failed test 'creating a replication slot'
# at
/....../postgresql/src/bin/pg_basebackup/../../../src/test/perl/TestLib.pm
line 371.
That file location is where we call out to the test function provided by
Test::More.
What we'd really want is
# Failed test 'creating a replication slot'
# at t/020_pg_receivewal.pl line 36.
because that's where the code that's doing the testing is.
To achieve that, we need to have our test library functions tell that
they are support functions and not the actual tests. The attached patch
does that. The mechanism is (somewhat) explained in the Test::Builder
man page.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
0001-Use-Test-Builder-Level-in-TAP-test-functions.patch | text/plain | 5.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2018-06-05 15:29:43 | Re: Code of Conduct plan |
Previous Message | Joshua D. Drake | 2018-06-05 15:26:19 | Re: Code of Conduct plan |