Re: location reporting in TAP test failures

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: location reporting in TAP test failures
Дата
Msg-id 67e25e42-fb52-2227-82f1-9e5edcadaa18@iki.fi
обсуждение исходный текст
Ответ на location reporting in TAP test failures  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: location reporting in TAP test failures  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On 05/06/18 18:28, Peter Eisentraut wrote:
> 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.

Looks good. I wish there was some way to remind to do this for any 
future test helper functions, too, but I don't have any ideas off the 
top of my head.

Since this is purely a test change, IMO this could go to master now, no 
need to wait for until v12 development starts.

- Heikki


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Fast default stuff versus pg_upgrade
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Fast default stuff versus pg_upgrade