From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: 53057@debbugs.gnu.org
Subject: [bug#53057] [PATCH] gnu: Add stress-ng.
Date: Thu, 06 Jan 2022 23:39:09 -0500 [thread overview]
Message-ID: <878rvsqhw2.fsf@gmail.com> (raw)
In-Reply-To: <20220106180636.31164-1-me@tobias.gr> (Tobias Geerinckx-Rice's message of "Thu, 6 Jan 2022 19:06:36 +0100")
Hi Tobias,
How timely! :-)
Tobias Geerinckx-Rice <me@tobias.gr> writes:
> * gnu/packages/admin.scm (stress-ng): New public variable.
> ---
> gnu/packages/admin.scm | 67 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 67 insertions(+)
>
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index d45857150f..6e180ec80a 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -2260,6 +2260,73 @@ (define-public stress
> system is under heavy load.")
> (license license:gpl2+)))
>
> +(define-public stress-ng
> + (package
> + (name "stress-ng")
> + (version "0.13.10")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/ColinIanKing/stress-ng")
> + (commit (string-append "V" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "1z9vjn2131iv3pwrh04z6r5ygi1qgad5bi3jhghcvc3v1b4k5ran"))))
> + (build-system gnu-build-system)
> + (arguments
> + (list #:make-flags
> + #~(list (string-append "CC=" #$(cc-for-target))
> + (string-append "BINDIR=" #$output "/bin")
> + (string-append "MANDIR=" #$output "/share/man")
> + (string-append "JOBDIR=" #$output
> + "/share/stress-ng/example-jobs")
> + (string-append "BASHDIR=" #$output
> + "/share/bash-completion/completions"))
> + #:test-target "lite-test"
> + #:phases
> + #~(modify-phases %standard-phases
> + (delete 'configure) ; no configure script
> + (add-after 'check 'check-a-little-harder
> + ;; XXX Guix supports only one #:test-target. Run more tests.
> + (lambda* (#:key tests? #:allow-other-keys)
> + (when tests?
> + (substitute* "debian/tests/fast-test-all"
> + (("EXCLUDE=\"" exclude=)
> + (string-append exclude=
> + ;; Fails if host kernel denies ptracing.
> + "ptrace ")))
> + (invoke "make" "fast-test-all"
> + "-j" (number->string (parallel-job-count)))))))))
This looks good and works good too! My only comment is that this should
honor parallel-tests?. Reusing the check phase but overriding the
test-target argument should do it:
modified gnu/packages/admin.scm
@@ -2289,15 +2289,15 @@ (define-public stress-ng
(delete 'configure) ; no configure script
(add-after 'check 'check-a-little-harder
;; XXX Guix supports only one #:test-target. Run more tests.
- (lambda* (#:key tests? #:allow-other-keys)
+ (lambda* (#:key tests? #:allow-other-keys #:rest args)
(when tests?
(substitute* "debian/tests/fast-test-all"
(("EXCLUDE=\"" exclude=)
(string-append exclude=
;; Fails if host kernel denies ptracing.
- "ptrace ")))
- (invoke "make" "fast-test-all"
- "-j" (number->string (parallel-job-count)))))))))
+ "ptrace "))))
+ (apply (assoc-ref %standard-phases 'check)
+ `(,@args #:test-target "fast-test-all")))))))
(inputs
(list keyutils
kmod
Otherwise, LGTM! Feel free to push with such adjustment.
Thank you!
Maxim
next prev parent reply other threads:[~2022-01-07 4:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 18:06 [bug#53057] [PATCH] gnu: Add stress-ng Tobias Geerinckx-Rice via Guix-patches via
2022-01-07 4:39 ` Maxim Cournoyer [this message]
2022-01-07 4:48 ` bug#53057: " Tobias Geerinckx-Rice via Guix-patches via
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=878rvsqhw2.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=53057@debbugs.gnu.org \
--cc=me@tobias.gr \
/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.