mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Don't clobber test exit code at cleanup in LDAP/Kerberors tests
If the test script die()d before running the first test, the whole test was interpreted as SKIPped rather than failed. The PostgreSQL::Cluster module got this right. Backpatch to all supported versions. Discussion: https://www.postgresql.org/message-id/fb898a70-3a88-4629-88e9-f2375020061d@iki.fi
This commit is contained in:
parent
e13b586d7c
commit
a475a2fa3b
@ -203,7 +203,12 @@ system_or_bail $krb5kdc, '-P', $kdc_pidfile;
|
|||||||
|
|
||||||
END
|
END
|
||||||
{
|
{
|
||||||
|
# take care not to change the script's exit value
|
||||||
|
my $exit_code = $?;
|
||||||
|
|
||||||
kill 'INT', `cat $kdc_pidfile` if defined($kdc_pidfile) && -f $kdc_pidfile;
|
kill 'INT', `cat $kdc_pidfile` if defined($kdc_pidfile) && -f $kdc_pidfile;
|
||||||
|
|
||||||
|
$? = $exit_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
note "setting up PostgreSQL instance";
|
note "setting up PostgreSQL instance";
|
||||||
|
@ -145,6 +145,9 @@ INIT
|
|||||||
|
|
||||||
END
|
END
|
||||||
{
|
{
|
||||||
|
# take care not to change the script's exit value
|
||||||
|
my $exit_code = $?;
|
||||||
|
|
||||||
foreach my $server (@servers)
|
foreach my $server (@servers)
|
||||||
{
|
{
|
||||||
next unless -f $server->{pidfile};
|
next unless -f $server->{pidfile};
|
||||||
@ -152,6 +155,8 @@ END
|
|||||||
chomp $pid;
|
chomp $pid;
|
||||||
kill 'INT', $pid;
|
kill 'INT', $pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$? = $exit_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
|
Loading…
x
Reference in New Issue
Block a user