From 8a9451c89e23d12c88d12557a0b612b851def528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 13 Dec 2012 00:24:27 +0100 Subject: [PATCH] tests: Arrange to have the socket file name fit in `sun_path'. * test-env.in (NIX_STATE_DIR): Choose a slightly smaller directory name. --- test-env.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test-env.in b/test-env.in index 9eb03dd498..4e388053f9 100644 --- a/test-env.in +++ b/test-env.in @@ -31,9 +31,15 @@ then NIX_STORE_DIR="@GUIX_TEST_ROOT@/store" NIX_LOCALSTATE_DIR="@GUIX_TEST_ROOT@/var" NIX_LOG_DIR="@GUIX_TEST_ROOT@/var/log/nix" - NIX_STATE_DIR="@GUIX_TEST_ROOT@/var/nix-$$" # allow for parallel tests NIX_DB_DIR="@GUIX_TEST_ROOT@/db" NIX_ROOT_FINDER="@abs_top_builddir@/nix/scripts/list-runtime-roots" + + # Choose a PID-dependent name to allow for parallel builds. Note + # that the directory name must be chosen so that the socket's file + # name is less than 108-char long (the size of `sun_path' in glibc). + # Currently, in Nix builds, we're at ~106 chars... + NIX_STATE_DIR="@GUIX_TEST_ROOT@/var/$$" # allow for parallel tests + export NIX_SUBSTITUTERS NIX_IGNORE_SYMLINK_STORE NIX_STORE_DIR \ NIX_LOCALSTATE_DIR NIX_LOG_DIR NIX_STATE_DIR NIX_DB_DIR \ NIX_ROOT_FINDER