GNU bug report logs - #49766
[PATCH] gnu: rocksdb: set TEST_TMPDIR for faster test i/o.

Previous Next

Package: guix-patches;

Reported by: Ryan Sundberg <ryan <at> arctype.co>

Date: Thu, 29 Jul 2021 05:01:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49766 in the body.
You can then email your comments to 49766 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49766; Package guix-patches. (Thu, 29 Jul 2021 05:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ryan Sundberg <ryan <at> arctype.co>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 29 Jul 2021 05:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ryan Sundberg <ryan <at> arctype.co>
To: guix-patches <at> gnu.org
Cc: Ryan Sundberg <ryan <at> arctype.co>
Subject: [PATCH] gnu: rocksdb: set TEST_TMPDIR for faster test i/o.
Date: Wed, 28 Jul 2021 22:00:26 -0700
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 | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 5de79de955..cd19d14950 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1395,10 +1395,19 @@ including field and record folding.")))
                (("install: install-static")
                 "install: install-shared")
                (("#!/bin/sh") (string-append "#!" (which "sh"))))
-             #t))
+             #t)) 
          (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.
@@ -1429,6 +1438,7 @@ including field and record folding.")))
        ("perl" ,perl)
        ("procps" ,procps)
        ("python" ,python-2)
+       ("util-linux" ,util-linux)
        ("which" ,which)))
     (inputs
      `(("bzip2" ,bzip2)
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#49766; Package guix-patches. (Thu, 29 Jul 2021 05:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 49766 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Sundberg <ryan <at> arctype.co>
To: 49766 <at> debbugs.gnu.org
Subject: [bug#49766] [PATCH] gnu: rocksdb: set TEST_TMPDIR for faster test
 i/o. 
Date: Wed, 28 Jul 2021 22:08:21 -0700
Revised patch






Information forwarded to guix-patches <at> gnu.org:
bug#49766; Package guix-patches. (Thu, 29 Jul 2021 05:14:01 GMT) Full text and rfc822 format available.

Message #11 received at 49766 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Sundberg <ryan <at> arctype.co>
To: 49766 <at> debbugs.gnu.org
Subject: [bug#49766] [PATCH] gnu: rocksdb: set TEST_TMPDIR for faster test i/o.
Date: Wed, 28 Jul 2021 22:13:06 -0700
Revised patch attached.






Information forwarded to guix-patches <at> gnu.org:
bug#49766; Package guix-patches. (Thu, 29 Jul 2021 05:18:02 GMT) Full text and rfc822 format available.

Message #14 received at 49766 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Sundberg <ryan <at> arctype.co>
To: 49766 <at> 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
[Message part 1 (text/plain, inline)]
I give up with git send-email, here is the darn patch file. From
Thunderbird.
[0001-gnu-rocksdb-set-TEST_TMPDIR-for-faster-test-i-o.patch (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 10 Aug 2021 15:14:02 GMT) Full text and rfc822 format available.

Notification sent to Ryan Sundberg <ryan <at> arctype.co>:
bug acknowledged by developer. (Tue, 10 Aug 2021 15:14:02 GMT) Full text and rfc822 format available.

Message #19 received at 49766-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ryan Sundberg <ryan <at> arctype.co>
Cc: 49766-done <at> debbugs.gnu.org
Subject: Re: bug#49766: [PATCH] gnu: rocksdb: set TEST_TMPDIR for faster
 test i/o.
Date: Tue, 10 Aug 2021 17:13:17 +0200
Hi,

Ryan Sundberg <ryan <at> arctype.co> skribis:

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

:-)

> From 672a5b2f00a095dd1afc3259eca3f14439323e2b Mon Sep 17 00:00:00 2001
> From: Ryan Sundberg <ryan <at> 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

Applied, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 08 Sep 2021 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 231 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.