unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#55118] [PATCH] gnu: Add phoronix-test-suite.
@ 2022-04-26  3:53 phodina via Guix-patches via
  2022-04-26  7:09 ` Maxime Devos
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: phodina via Guix-patches via @ 2022-04-26  3:53 UTC (permalink / raw)
  To: 55118


[-- Attachment #1.1: Type: text/plain, Size: 84 bytes --]

Hi,

I've packaged Phoronix test suite. Hopefully all inputs are wrapped.

----
Petr

[-- Attachment #1.2: Type: text/html, Size: 487 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-phoronix-test-suite.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-phoronix-test-suite.patch, Size: 5712 bytes --]

From 7af9ee1fe5ca48b15156c591d5d6d77ac64ff2bc Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Tue, 26 Apr 2022 05:48:11 +0200
Subject: [PATCH] gnu: Add phoronix-test-suite.

* gnu/packages/benchmark.scm (phoronix-test-suite): New variable.

diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index ce137d845e..ee51d0cd83 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -34,14 +35,17 @@ (define-module (gnu packages benchmark)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages c)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages docbook)
@@ -51,6 +55,7 @@ (define-module (gnu packages benchmark)
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages opencl)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages php)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-science)
@@ -262,6 +267,77 @@ (define-public bonnie++
 file metadata operations that can be performed per second.")
     (license license:gpl2)))   ;GPL 2 only, see copyright.txt
 
+(define-public phoronix-test-suite
+  (package
+    (name "phoronix-test-suite")
+    (version "10.8.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url
+                     "https://github.com/phoronix-test-suite/phoronix-test-suite")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1q509piv5r8lkx82n9qgma19wd01f5ihy1ks1604865fwah1jg19"))))
+    (build-system copy-build-system)
+    (arguments
+     (let ((pts "pts-core/external-test-dependencies")
+           (usr (string-append "usr/share/phoronix-test-suite/"
+                               "pts-core/external-test-dependencies")))
+       (list #:install-plan
+             #~`((,(string-append #$pts
+                   "/dependency-handlers/arch_dependency_handler.php")
+                  ,(string-append #$usr
+                   "/dependency-handlers/arch_dependency_handler.php"))
+                 (,(string-append #$pts "/scripts/install-arch-packages.sh")
+                  ,(string-append #$usr "/scripts/install-arch-packages.sh"))
+                 (,(string-append #$pts "/xml/arch-packages.xml")
+                  ,(string-append #$usr
+                   "/pts-core/external-test-dependencies/xml/arch-packages.xml"))
+                 (,(string-append #$pts "/xml/generic-packages.xml")
+                  ,(string-append #$usr "/xml/generic-packages.xml")))
+             #:phases
+             #~(modify-phases %standard-phases
+                 (add-before 'install 'executable-link
+                   (lambda* (#:key inputs outputs #:allow-other-keys)
+                     (setenv "HOME" "/tmp")
+                     (invoke "./install-sh"
+                             (string-append #$output "/usr"))
+                     (mkdir-p (string-append #$output "/bin"))
+                     (wrap-program
+                      (string-append #$output
+                        "/usr/bin/phoronix-test-suite")
+                       `("PATH" ":" prefix
+                         ,(map (lambda (dir)
+                                 (string-append dir "/bin:" dir
+                                                "/sbin"))
+                               (list #$(this-package-input "php")
+                                     #$(this-package-input "sed")
+                                     #$(this-package-input "which")))))
+                     (symlink (string-append #$output
+                                             "/usr/bin/phoronix-test-suite")
+                              (string-append #$output "/bin/pts"))
+                     (delete-file-recursively
+                      (string-append #$output
+                                     "/usr/share/phoronix-test-suite/deploy"))
+                     (with-directory-excursion
+                      (string-append #$output "/" #$usr)
+                        (for-each (lambda (dir)
+                                    (delete-file-recursively
+                                     dir))
+                                  (list
+                                   "dependency-handlers"
+                                   "scripts" "xml")))))))))
+    (inputs (list bash-minimal sed which xdg-utils))
+    (propagated-inputs (list php))
+    (home-page "https://github.com/phoronix-test-suite/phoronix-test-suite")
+    (synopsis "Automated testing/benchmarking software")
+    (description "This package provides automated testing/benchmarking
+software.")
+    (license license:gpl3+)))
+
 (define-public python-locust
   (package
     (name "python-locust")
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#55118] [PATCH] gnu: Add phoronix-test-suite.
  2022-04-26  3:53 [bug#55118] [PATCH] gnu: Add phoronix-test-suite phodina via Guix-patches via
@ 2022-04-26  7:09 ` Maxime Devos
  2022-04-26  7:12 ` Maxime Devos
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Maxime Devos @ 2022-04-26  7:09 UTC (permalink / raw)
  To: phodina, 55118

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

phodina via Guix-patches via schreef op di 26-04-2022 om 03:53 [+0000]:
> +                               (list #$(this-package-input "php")

It looks at a some files like /usr/bin/php8.  While these do not exist
on Guix System, these don't seem right on foreign distos -- shouldn't
Guix' php be used instead of the foreign distro's php?

Greeti,gs,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#55118] [PATCH] gnu: Add phoronix-test-suite.
  2022-04-26  3:53 [bug#55118] [PATCH] gnu: Add phoronix-test-suite phodina via Guix-patches via
  2022-04-26  7:09 ` Maxime Devos
@ 2022-04-26  7:12 ` Maxime Devos
  2022-04-26  7:14 ` Maxime Devos
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Maxime Devos @ 2022-04-26  7:12 UTC (permalink / raw)
  To: phodina, 55118

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

phodina via Guix-patches via schreef op di 26-04-2022 om 03:53 [+0000]:
> +                               (list #$(this-package-input "php")
> +                                     #$(this-package-input "sed")
> +                                     #$(this-package-input
> "which")))))

chmod & rm from coreutils-minimal, and 'sh' from bash-minimal are
missing.  I recommend changing 'prefix' to '=' to catch these kind of
issues.

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#55118] [PATCH] gnu: Add phoronix-test-suite.
  2022-04-26  3:53 [bug#55118] [PATCH] gnu: Add phoronix-test-suite phodina via Guix-patches via
  2022-04-26  7:09 ` Maxime Devos
  2022-04-26  7:12 ` Maxime Devos
@ 2022-04-26  7:14 ` Maxime Devos
  2022-04-26  7:18 ` Maxime Devos
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Maxime Devos @ 2022-04-26  7:14 UTC (permalink / raw)
  To: phodina, 55118

[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

phodina via Guix-patches via schreef op di 26-04-2022 om 03:53 [+0000]:
> +                       `("PATH" ":" prefix
> +                         ,(map (lambda (dir)
> +                                 (string-append dir "/bin:" dir
> +                                                "/sbin"))
> +                               (list #$(this-package-input "php")
> +                                     #$(this-package-input "sed")
> +                                     #$(this-package-input
> "which")))))

To allow for inputs with changed names and avoid input labels, maybe:

  `("PATH" ":" prefix
    ,(map (lambda (binary)
            (dirname (search-input-file (string-append "bin/" binary))))
          '("php" "sed" "which")))

?

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#55118] [PATCH] gnu: Add phoronix-test-suite.
  2022-04-26  3:53 [bug#55118] [PATCH] gnu: Add phoronix-test-suite phodina via Guix-patches via
                   ` (2 preceding siblings ...)
  2022-04-26  7:14 ` Maxime Devos
@ 2022-04-26  7:18 ` Maxime Devos
  2022-04-26  7:19 ` Maxime Devos
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Maxime Devos @ 2022-04-26  7:18 UTC (permalink / raw)
  To: phodina, 55118

[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]

phodina via Guix-patches via schreef op di 26-04-2022 om 03:53 [+0000]:
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url
> +                    
> "https://github.com/phoronix-test-suite/phoronix-test-suite")
> +                    (commit (string-append "v" version))))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +               
> "1q509piv5r8lkx82n9qgma19wd01f5ihy1ks1604865fwah1jg19"))))

I can't say I'm familiar with the quoting rules of shell but there seem
to be some quoees missing around $PATH in ...

  PATH="`echo $PATH | sed -e s/:[\.]:/:/g -e s/:[\.]// -e  s/[\.]://`"

`dirname $0` in 

	export PTS_DIR=$(readlink -f `dirname $0`)

(maybe also around the whole $(...)) construct.

E.g., try readlink -f `echo 0 1` -- instead of reading the file "0 1",
it reads "0" and "1".

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#55118] [PATCH] gnu: Add phoronix-test-suite.
  2022-04-26  3:53 [bug#55118] [PATCH] gnu: Add phoronix-test-suite phodina via Guix-patches via
                   ` (3 preceding siblings ...)
  2022-04-26  7:18 ` Maxime Devos
@ 2022-04-26  7:19 ` Maxime Devos
  2022-04-26 13:01 ` Denis 'GNUtoo' Carikli
  2022-07-07 21:46 ` bug#55118: " Maxim Cournoyer
  6 siblings, 0 replies; 8+ messages in thread
From: Maxime Devos @ 2022-04-26  7:19 UTC (permalink / raw)
  To: phodina, 55118

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

phodina via Guix-patches via schreef op di 26-04-2022 om 03:53 [+0000]:
> +    (license license:gpl3+)))

I noticed the line

-  [...] However, some tests supported by the Phoronix Test Suite are
not open-source software or require commercial software packages.

Are the non-free parts excluded in this package?

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#55118] [PATCH] gnu: Add phoronix-test-suite
  2022-04-26  3:53 [bug#55118] [PATCH] gnu: Add phoronix-test-suite phodina via Guix-patches via
                   ` (4 preceding siblings ...)
  2022-04-26  7:19 ` Maxime Devos
@ 2022-04-26 13:01 ` Denis 'GNUtoo' Carikli
  2022-07-07 21:46 ` bug#55118: " Maxim Cournoyer
  6 siblings, 0 replies; 8+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2022-04-26 13:01 UTC (permalink / raw)
  To: 55118

[-- Attachment #1: Type: text/plain, Size: 340 bytes --]

Hi,

For the benchmarks/tests, I'm really bad at php but it seems I've still
managed to disable most tests in the Parabola package of
phoronix-test-suite[1] and keep some non-problematic ones like the php
compilation test.

References:
------------
[1]https://git.parabola.nu/abslibre.git/tree/libre/phoronix-test-suite

Denis.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#55118: [PATCH] gnu: Add phoronix-test-suite.
  2022-04-26  3:53 [bug#55118] [PATCH] gnu: Add phoronix-test-suite phodina via Guix-patches via
                   ` (5 preceding siblings ...)
  2022-04-26 13:01 ` Denis 'GNUtoo' Carikli
@ 2022-07-07 21:46 ` Maxim Cournoyer
  6 siblings, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2022-07-07 21:46 UTC (permalink / raw)
  To: phodina; +Cc: 55118-done

Hi!

phodina <phodina@protonmail.com> writes:

> Hi,
>
> I've packaged Phoronix test suite. Hopefully all inputs are wrapped.

I had missed this contribution and contributed it myself in
92121b8e9db9541b0fdf0e6e0b17e28e03a01277; apologies!

Closing.

Maxim




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-07-07 21:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-26  3:53 [bug#55118] [PATCH] gnu: Add phoronix-test-suite phodina via Guix-patches via
2022-04-26  7:09 ` Maxime Devos
2022-04-26  7:12 ` Maxime Devos
2022-04-26  7:14 ` Maxime Devos
2022-04-26  7:18 ` Maxime Devos
2022-04-26  7:19 ` Maxime Devos
2022-04-26 13:01 ` Denis 'GNUtoo' Carikli
2022-07-07 21:46 ` bug#55118: " Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).