Getting started notes and trouble running the tests

Поиск
Список
Период
Сортировка
От Kevin Burke
Тема Getting started notes and trouble running the tests
Дата
Msg-id CAAJ6v9CymXJMdgKaRx7=rKvCdhGbQhSStvfhEFayomr5cbwyZQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Getting started notes and trouble running the tests  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
Hi,
I'm trying to check out the Postgres sources to get started contributing. The first step was trying to run the tests. 

On Mac, I get this error when I run "./configure" and then "gmake check":

[Output omitted]
sh: line 1: 51711 Abort trap: 6           "psql" -X postgres < /dev/null 2> /dev/null
sh: line 1: 51714 Abort trap: 6           "psql" -X postgres < /dev/null 2> /dev/null
sh: line 1: 51717 Abort trap: 6           "psql" -X postgres < /dev/null 2> /dev/null
sh: line 1: 51721 Abort trap: 6           "psql" -X postgres < /dev/null 2> /dev/null
pg_regress: postmaster did not respond within 60 seconds
Examine /Users/kevin/src/github.com/postgres/postgres/src/test/regress/log/postmaster.log for the reason
gmake[1]: *** [GNUmakefile:132: check] Error 2
gmake[1]: Leaving directory '/Users/kevin/src/github.com/postgres/postgres/src/test/regress'
gmake: *** [GNUmakefile:69: check] Error 2

I'm confused because the logs indicate that the database started.

2021-02-13 14:39:47.132 PST postmaster[51535] LOG:  starting PostgreSQL 14devel on x86_64-apple-darwin19.6.0, compiled by Apple clang version 12.0.0 (clang-1200.0.32.28), 64-bit
2021-02-13 14:39:47.133 PST postmaster[51535] LOG:  listening on Unix socket "/var/folders/s1/909yt58s4wj8h_7v7frr8rkm0000gn/T/pg_regress-o1o8IS/.s.PGSQL.58080"
2021-02-13 14:39:47.138 PST startup[51538] LOG:  database system was shut down at 2021-02-13 14:39:47 PST
2021-02-13 14:39:47.141 PST postmaster[51535] LOG:  database system is ready to accept connections

Perhaps the issue is that psql is looking in the wrong place? I ensured that there's no psql in my $PATH before running "gmake check", but if I install it, it looks for a socket in /tmp, not /var/folders.

Some other notes:

For fun I tried seeing if I could use mesalink - github.com/mesalock-linux/mesalink - as a drop in replacement for OpenSSL. I need to specify two "includes" folders and it was unclear how to do this from the configure --help output - commas? colons? Specify the flag multiple times? The answer ended up being colons but this could be more obvious.

Is there a way to run just the tests for a particular part of the code? The docs on running the tests weren't clear, and starting "gmake check" seems slow in the best case. In my case I'd like to run just the tests related to OpenSSL, and src/backend/libpq/be-secure.c.

Kevin

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

Предыдущее
От: tsuraan
Дата:
Сообщение: Streaming replication upgrade sanity check
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Getting started notes and trouble running the tests