Subject: bug#56172: closed (Re: bug#56172: [PATCH]: gnu: Add utest-h)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 03 Jul 2022 10:44:02 +0000

Your bug report

#56172: [PATCH]: gnu: Add utest-h

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
56172: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56172
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#56172: [PATCH]: gnu: Add utest-h
From: Ludovic Courtès <[email-masked]>
To: "Artyom V. Poptsov" <[email-masked]>
Cc: Maxime Devos <[email-masked]>, [email-masked]
Date: Sun, 03 Jul 2022 12:43:38 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Artyom,

"Artyom V. Poptsov" <[email-masked]> skribis:

> From 32e6acb58e9ef9fa53add7ac323d470dab9a9089 Mon Sep 17 00:00:00 2001
> From: "Artyom V. Poptsov" <[email-masked]>
> Date: Thu, 23 Jun 2022 22:07:05 +0300
> Subject: [PATCH] gnu: Add utest-h
>
> * gnu/packages/c.scm (utest-h): New variable.

Applied with the changes below (info "(guix) Synopses and
Descriptions").

Thanks,
Ludo’.

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index bcacccfd03..327f41589d 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -1163,6 +1163,7 @@ (define-public utest-h
                           (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++.")
+      (synopsis "Single-header unit testing framework for C and C++")
+      (description
+       "This package provides a header-only unit testing library for C/C++.")
       (license license:unlicense))))

Subject: [PATCH]: gnu: Add utest-h
From: "Artyom V. Poptsov" <[email-masked]>
To: [email-masked]
Date: Thu, 23 Jun 2022 22:09:51 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

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

From a458a9a406ad4b4b4758b293e648965591c5fbd0 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <[email-masked]>
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 <[email-masked]>
 ;;; Copyright © 2021 Foo Chuan Wei <[email-masked]>
 ;;; Copyright © 2022 (unmatched parenthesis <[email-masked]>
+;;; Copyright © 2022 Artyom V. Poptsov <[email-masked]>
 ;;;
 ;;; 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

Thanks,

- Artyom

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

-- 
Artyom "avp" Poptsov <[email-masked]>
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