src/test/perl/TestLib.pm: check_pg_config needs/usr/include/postgresql/pg_config.h
| От | Christoph Berg | 
|---|---|
| Тема | src/test/perl/TestLib.pm: check_pg_config needs/usr/include/postgresql/pg_config.h | 
| Дата | |
| Msg-id | 20200508191644.GA165095@msg.df7cb.de обсуждение исходный текст | 
| Ответы | Re: src/test/perl/TestLib.pm: check_pg_config needs /usr/include/postgresql/pg_config.h | 
| Список | pgsql-hackers | 
I believe check_pg_config as used by src/test/ssl/t/002_scram.pl
shouldn't rely on /usr/include/postgresql/pg_config.h but use the file
from the build tree instead:
src/test/perl/TestLib.pm:
    Return the number of matches of the given regular expression
    within the installation's C<pg_config.h>.
    =cut
    sub check_pg_config
    {
        my ($regexp) = @_;
        my ($stdout, $stderr);
        my $result = IPC::Run::run [ 'pg_config', '--includedir' ], '>',
          \$stdout, '2>', \$stderr
          or die "could not execute pg_config";
        chomp($stdout);
        $stdout =~ s/\r$//;
        open my $pg_config_h, '<', "$stdout/pg_config.h" or die "$!"; <-- here
        my $match = (grep { /^$regexp/ } <$pg_config_h>);
        close $pg_config_h;
        return $match;
    }
src/test/ssl/README claims that it is possible to run the "ssl" extra
test from make check (as opposed to installcheck).
Christoph
		
	В списке pgsql-hackers по дате отправления: