From 4171ab4c4fd576c516dc03ba64d1c7945f769af0 Mon Sep 17 00:00:00 2001 From: danbst Date: Fri, 29 Mar 2019 23:46:38 +0200 Subject: [PATCH] tests: change postgresql socket dir to /tmp In https://github.com/NixOS/nixpkgs/pull/57677 default postgresql socket directory was changed to `/run/postgresql`, which doesn't exist (and can't be created) in Nix build environment. We'll use /tmp as socket dir explicitly then. Fixes build failure https://hydra.nixos.org/build/91221682 Cc @aszlig @edolstra --- .gitignore | 1 + tests/Makefile.am | 1 + tests/set-up.pl | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ab5603e2..e53ae6a8 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ Makefile.in /inst hydra-config.h hydra-config.h.in +result diff --git a/tests/Makefile.am b/tests/Makefile.am index cff12f09..e56e528e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -12,6 +12,7 @@ TESTS_ENVIRONMENT = \ NIX_STORE_DIR="$(abs_builddir)/nix/store" \ NIX_LOG_DIR="$(abs_builddir)/nix/var/log/nix" \ NIX_BUILD_HOOK= \ + PGHOST=/tmp \ PERL5LIB="$(srcdir):$(abs_top_srcdir)/src/lib:$$PERL5LIB" \ PATH=$(abs_top_srcdir)/src/hydra-evaluator:$(abs_top_srcdir)/src/script:$(abs_top_srcdir)/src/hydra-eval-jobs:$(abs_top_srcdir)/src/hydra-queue-runner:$$PATH \ perl -w diff --git a/tests/set-up.pl b/tests/set-up.pl index 63679b63..d7aa35cc 100644 --- a/tests/set-up.pl +++ b/tests/set-up.pl @@ -1,5 +1,5 @@ use strict; system("initdb -D postgres") == 0 or die; -system("pg_ctl -D postgres -o \"-F -p 6433 -h ''\" -w start") == 0 or die; +system("pg_ctl -D postgres -o \"-F -p 6433 -h '' -k /tmp \" -w start") == 0 or die; system("createdb -p 6433 hydra-test-suite") == 0 or die; system("hydra-init") == 0 or die;