mirror of
https://github.com/postgres/postgres.git
synced 2025-05-18 17:41:14 +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
9e0493445a
commit
f700e7d571
@ -180,7 +180,12 @@ system_or_bail $krb5kdc, '-P', $kdc_pidfile;
|
||||
|
||||
END
|
||||
{
|
||||
kill 'INT', `cat $kdc_pidfile` if -f $kdc_pidfile;
|
||||
# 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;
|
||||
|
||||
$? = $exit_code;
|
||||
}
|
||||
|
||||
note "setting up PostgreSQL instance";
|
||||
|
@ -147,7 +147,12 @@ system_or_bail $slapd, '-f', $slapd_conf,'-s0', '-h', "$ldap_url $ldaps_url";
|
||||
|
||||
END
|
||||
{
|
||||
# take care not to change the script's exit value
|
||||
my $exit_code = $?;
|
||||
|
||||
kill 'INT', `cat $slapd_pidfile` if -f $slapd_pidfile;
|
||||
|
||||
$? = $exit_code;
|
||||
}
|
||||
|
||||
append_to_file($ldap_pwfile, $ldap_rootpw);
|
||||
|
Loading…
x
Reference in New Issue
Block a user