aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Sundberg <ryan@arctype.co>2021-07-28 20:43:14 -0700
committerLudovic Courtès <ludo@gnu.org>2021-08-10 17:32:18 +0200
commit75e117bac713134c060b1276849cc1c8cd6ae183 (patch)
tree1c1c12926753f1d0e36e32be60f50ab15eea8328
parent06c11434c9288bc70ba958227d47d31d5e46eda7 (diff)
downloadguix-75e117bac713134c060b1276849cc1c8cd6ae183.tar
guix-75e117bac713134c060b1276849cc1c8cd6ae183.tar.gz
gnu: rocksdb: set TEST_TMPDIR for faster test i/o.
The rocksdb test can take an egregious amount of time on a spinning HDD. This will inherit guixbuild's /tmp mount for the rocksdb testing directory. * gnu/packages/databases.scm (rocksdb)[arguments]: set TEST_TMPDIR for check phase Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/databases.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index ca7075a089..fbff9e8a7c 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1396,6 +1396,15 @@ including field and record folding.")))
(delete 'configure)
;; The default target is only needed for tests and built on demand.
(delete 'build)
+ (add-before 'check 'mount-tmp
+ ;; Use the provided workspace directory for test files.
+ ;; Otherwise, /tmp is used which is a mount namespace on /gnu/store.
+ ;; This speeds up the build when the host /tmp is a proper tmpfs or
+ ;; other fast filesystem, as opposed to /gnu which may be a HDD.
+ (lambda _
+ (let ((test-dir (string-append (getcwd) "/../test")))
+ (mkdir test-dir)
+ (setenv "TEST_TMPDIR" (canonicalize-path test-dir)))))
(add-before 'check 'disable-optimizations
(lambda _
;; Prevent the build from passing '-march=native' to the compiler.