unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#56172] [PATCH]: gnu: Add utest-h
@ 2022-06-23 19:09 Artyom V. Poptsov
  2022-06-23 19:52 ` Maxime Devos
  0 siblings, 1 reply; 4+ messages in thread
From: Artyom V. Poptsov @ 2022-06-23 19:09 UTC (permalink / raw)
  To: 56172


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

Hello,

this patch adds 'utest.h' [1] under the name 'utest-h'.


[-- Attachment #1.2: 0001-gnu-Add-utest-h.patch --]
[-- Type: text/x-diff, Size: 2850 bytes --]

From a458a9a406ad4b4b4758b293e648965591c5fbd0 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Thu, 23 Jun 2022 22:07:05 +0300
Subject: [PATCH] gnu: Add utest-h

* gnu/packages/c.scm (utest-h): New variable.
---
 gnu/packages/c.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 3e49539473..69797df8b3 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2021 David Dashyan <mail@davie.li>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org>
+;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1134,3 +1135,39 @@ performance concurrent systems developed in C99+.")
 C and C++.  The functions it provides are like those from the C header
 string.h, but with a utf8* prefix instead of the str* prefix.")
       (license license:unlicense))))
+
+(define-public utest-h
+  ;; The latest tag is used as there is no release.
+  (let ((commit "54458e248f875f1a51f0af8bec8ca6ae7761b9d1") (revision "0"))
+    (package
+      (name "utest-h")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/sheredom/utest.h")
+                      (commit commit)))
+                (file-name (git-file-name "utest.h" version))
+                (sha256
+                 (base32
+                  "1ikl5jwmjdw1mblqyl2kvnqwkjgaz78c1h7mjcfmzjc0d3h8kh44"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:phases (modify-phases %standard-phases
+                    (delete 'build)
+                    (delete 'configure)
+                    (replace 'check
+                      (lambda* (#:key tests? #:allow-other-keys)
+                        (when tests?
+                          (with-directory-excursion "test"
+                                                    (invoke "cmake" ".")
+                                                    (invoke "make")))))
+                    (replace 'install
+                      (lambda* (#:key outputs #:allow-other-keys)
+                        (let ((out (assoc-ref outputs "out")))
+                          (install-file "utest.h"
+                                        (string-append out "/include"))))))))
+      (home-page "https://www.duskborn.com/utest_h/")
+      (synopsis "Single header unit testing framework for C and C++")
+      (description "A simple one header solution to unit testing for C/C++.")
+      (license license:unlicense))))
-- 
2.25.1


[-- Attachment #1.3: Type: text/plain, Size: 285 bytes --]


Thanks,

- Artyom

References:
1. https://github.com/sheredom/utest.h

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* [bug#56172] [PATCH]: gnu: Add utest-h
  2022-06-23 19:09 [bug#56172] [PATCH]: gnu: Add utest-h Artyom V. Poptsov
@ 2022-06-23 19:52 ` Maxime Devos
  2022-06-23 20:05   ` Artyom V. Poptsov
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Devos @ 2022-06-23 19:52 UTC (permalink / raw)
  To: Artyom V. Poptsov, 56172

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

Artyom V. Poptsov schreef op do 23-06-2022 om 22:09 [+0300]:
> +  ;; The latest tag is used as there is no release.

I assume tag -> commit?

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

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

* [bug#56172] [PATCH]: gnu: Add utest-h
  2022-06-23 19:52 ` Maxime Devos
@ 2022-06-23 20:05   ` Artyom V. Poptsov
  2022-06-26 20:40     ` Artyom V. Poptsov
  0 siblings, 1 reply; 4+ messages in thread
From: Artyom V. Poptsov @ 2022-06-23 20:05 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 56172


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

Hello Maxime.

> I assume tag -> commit?

Yes, indeed.

Here's the fixed version.


[-- Attachment #1.2: 0001-gnu-Add-utest-h.patch --]
[-- Type: text/x-diff, Size: 2866 bytes --]

From 32e6acb58e9ef9fa53add7ac323d470dab9a9089 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Thu, 23 Jun 2022 22:07:05 +0300
Subject: [PATCH] gnu: Add utest-h

* gnu/packages/c.scm (utest-h): New variable.
---
 gnu/packages/c.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 3e49539473..bb8a668834 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2021 David Dashyan <mail@davie.li>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org>
+;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1134,3 +1135,40 @@ performance concurrent systems developed in C99+.")
 C and C++.  The functions it provides are like those from the C header
 string.h, but with a utf8* prefix instead of the str* prefix.")
       (license license:unlicense))))
+
+(define-public utest-h
+  ;; The latest commit is used as there is no release.
+  (let ((commit   "54458e248f875f1a51f0af8bec8ca6ae7761b9d1")
+        (revision "0"))
+    (package
+      (name "utest-h")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/sheredom/utest.h")
+                      (commit commit)))
+                (file-name (git-file-name "utest.h" version))
+                (sha256
+                 (base32
+                  "1ikl5jwmjdw1mblqyl2kvnqwkjgaz78c1h7mjcfmzjc0d3h8kh44"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:phases (modify-phases %standard-phases
+                    (delete 'build)
+                    (delete 'configure)
+                    (replace 'check
+                      (lambda* (#:key tests? #:allow-other-keys)
+                        (when tests?
+                          (with-directory-excursion "test"
+                                                    (invoke "cmake" ".")
+                                                    (invoke "make")))))
+                    (replace 'install
+                      (lambda* (#:key outputs #:allow-other-keys)
+                        (let ((out (assoc-ref outputs "out")))
+                          (install-file "utest.h"
+                                        (string-append out "/include"))))))))
+      (home-page "https://www.duskborn.com/utest_h/")
+      (synopsis "Single header unit testing framework for C and C++")
+      (description "A simple one header solution to unit testing for C/C++.")
+      (license license:unlicense))))
-- 
2.25.1


[-- Attachment #1.3: Type: text/plain, Size: 230 bytes --]


Thanks,

- Artyom

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* [bug#56172] [PATCH]: gnu: Add utest-h
  2022-06-23 20:05   ` Artyom V. Poptsov
@ 2022-06-26 20:40     ` Artyom V. Poptsov
  0 siblings, 0 replies; 4+ messages in thread
From: Artyom V. Poptsov @ 2022-06-26 20:40 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 56172

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

Hello,

this is a gently ping.  :-)

Meanwhile, I've recently submitted a patch that adds 'ubench-h' (of the
same author) just after the 'utest-h' package.

- Artyom

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

end of thread, other threads:[~2022-06-26 20:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23 19:09 [bug#56172] [PATCH]: gnu: Add utest-h Artyom V. Poptsov
2022-06-23 19:52 ` Maxime Devos
2022-06-23 20:05   ` Artyom V. Poptsov
2022-06-26 20:40     ` Artyom V. Poptsov

Code repositories for project(s) associated with this 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).