all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ryan Sundberg via Guix-patches via <guix-patches@gnu.org>
To: 49766@debbugs.gnu.org
Subject: [bug#49766] [PATCH] gnu: rocksdb: set TEST_TMPDIR for faster test i/o.
Date: Wed, 28 Jul 2021 22:17:24 -0700	[thread overview]
Message-ID: <d7870efd-91fb-7240-b77f-de7e3eb0b592@arctype.co> (raw)
In-Reply-To: <20210729051307.24599-1-ryan@arctype.co>


[-- Attachment #1.1.1: Type: text/plain, Size: 80 bytes --]

I give up with git send-email, here is the darn patch file. From
Thunderbird.

[-- Attachment #1.1.2: 0001-gnu-rocksdb-set-TEST_TMPDIR-for-faster-test-i-o.patch --]
[-- Type: text/x-patch, Size: 1642 bytes --]

From 672a5b2f00a095dd1afc3259eca3f14439323e2b Mon Sep 17 00:00:00 2001
From: Ryan Sundberg <ryan@arctype.co>
Date: Wed, 28 Jul 2021 20:43:14 -0700
Subject: [PATCH] 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
---
 gnu/packages/databases.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 5de79de955..da93bc758e 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1399,6 +1399,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.
-- 
2.31.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2021-07-29  5:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29  5:00 [bug#49766] [PATCH] gnu: rocksdb: set TEST_TMPDIR for faster test i/o Ryan Sundberg via Guix-patches via
2021-07-29  5:08 ` Ryan Sundberg via Guix-patches via
2021-07-29  5:13 ` Ryan Sundberg via Guix-patches via
2021-07-29  5:17   ` Ryan Sundberg via Guix-patches via [this message]
2021-08-10 15:13     ` bug#49766: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7870efd-91fb-7240-b77f-de7e3eb0b592@arctype.co \
    --to=guix-patches@gnu.org \
    --cc=49766@debbugs.gnu.org \
    --cc=ryan@arctype.co \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.