postgresqlTestHook: shutdown on failure
Previously, the user of postgresqlTestHook would have needed to set failureHook accordingly. However, this was not a clean solution, because postgresqlStop would also run for configure or build failures, before the server was even started. This gave odd errors from a failed shutdown in the log. Now postgresqlStop is only called when it makes sense - and whenever postgresqlTestHook is used.
This commit is contained in:
@@ -45,7 +45,6 @@ postgresqlBuildExtension (finalAttrs: {
|
||||
SELECT * FROM finish();
|
||||
ROLLBACK;
|
||||
'';
|
||||
failureHook = "postgresqlStop";
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
psql -a -v ON_ERROR_STOP=1 -f $sqlPath
|
||||
|
||||
@@ -92,7 +92,6 @@ postgresqlBuildExtension (finalAttrs: {
|
||||
];
|
||||
|
||||
postgresqlTestUserOptions = "LOGIN SUPERUSER";
|
||||
failureHook = "postgresqlStop";
|
||||
|
||||
# postgis config directory assumes /include /lib from the same root for json-c library
|
||||
env.NIX_LDFLAGS = "-L${lib.getLib json_c}/lib";
|
||||
|
||||
Reference in New Issue
Block a user