[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/08: gnu: rocksdb: set TEST_TMPDIR for faster test i/o.
From: |
guix-commits |
Subject: |
03/08: gnu: rocksdb: set TEST_TMPDIR for faster test i/o. |
Date: |
Tue, 10 Aug 2021 11:33:47 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 75e117bac713134c060b1276849cc1c8cd6ae183
Author: Ryan Sundberg <ryan@arctype.co>
AuthorDate: Wed Jul 28 20:43:14 2021 -0700
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>
---
gnu/packages/databases.scm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index ca7075a..fbff9e8 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.
- branch master updated (b0a6b1f -> 1e16e19), guix-commits, 2021/08/10
- 01/08: store: Add 'map/accumulate-builds' cutoff to address pathological cases., guix-commits, 2021/08/10
- 02/08: gnu: dealii-openmpi: Add Trilinos dependency., guix-commits, 2021/08/10
- 03/08: gnu: rocksdb: set TEST_TMPDIR for faster test i/o.,
guix-commits <=
- 04/08: etc/committer: Support custom commit messages., guix-commits, 2021/08/10
- 05/08: etc/committer: Pass command-line arguments to main., guix-commits, 2021/08/10
- 06/08: gnu: sendmail: Install executables to $prefix/sbin and $prefix/bin directories., guix-commits, 2021/08/10
- 07/08: gnu: Add task-spooler., guix-commits, 2021/08/10
- 08/08: gnu: python-libusb1: Update to 1.9.3., guix-commits, 2021/08/10