[PATCH]: gnu: Add utest-h

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Maxime Devos
  • Artyom V. Poptsov
Owner
unassigned
Submitted by
Artyom V. Poptsov
Severity
normal

Debbugs page

Artyom V. Poptsov wrote 3 years ago
(address . guix-patches@gnu.org)
87a6a342o0.fsf@gmail.com
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" <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(+)

Toggle diff (54 lines)
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
Thanks,

- Artyom

References:

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmK0un8ACgkQ6cWi2QiY
oC8xoAf9GjjqucdsKfwE5OLaQDqxaFgaD9mo/MiCkm1sOEONQE6jVIIjLBNIALE1
RmK3hGJCE9Nflg5QEfrKYKqHYcHA1Ovn9sRY0CK9GOnDqEylJw40BSyHsHi9L6rC
AKJm1iO8bnzl6VcUT1S4TMSWTwKJ5hD3zvVWWYPEWm6d7/URtVMm9Sib+ckX0rFF
XOxOeJAo/vjUFV6Rc1+lTtu6Sc6lyn4B/cg5TTf3Zx2kKlpGz3BukjjJC8ycR6pc
ywTaP8kIn3E71dAo7tc2LiEeLNgb2mAhFr+wvV1tA8X+qu1Sf133ib6eUGQJlArp
cTiBrDOfHhGdrXa6uW5kFEkXS4BEUA==
=+ESi
-----END PGP SIGNATURE-----

Maxime Devos wrote 3 years ago
c025825da1ba4010426055e3d51afa4ebbdc8e34.camel@telenet.be
Artyom V. Poptsov schreef op do 23-06-2022 om 22:09 [+0300]:
Toggle quote (2 lines)
> +  ;; The latest tag is used as there is no release.

I assume tag -> commit?
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrTEkBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qNjAP0V5gj4z6bSE3uOvt/3EEPeSX61
3KVaPvJumSBOVKjCkAD/f95Srr8hOt94251xOu8P+L7jJBw5HckLY85cM7q31Q0=
=YRQd
-----END PGP SIGNATURE-----


Artyom V. Poptsov wrote 3 years ago
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 56172@debbugs.gnu.org)
875ykr4042.fsf@gmail.com
Hello Maxime.

Toggle quote (2 lines)
> I assume tag -> commit?

Yes, indeed.

Here's the fixed version.
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(+)

Toggle diff (55 lines)
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
Thanks,

- Artyom

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmK0x20ACgkQ6cWi2QiY
oC91jgf/RyB+W2C7ow3hwqvkc9Preu26fpVZdP7N+XGkNMKCCc2i3KbmilX/uHro
mvXenklujVVemsJZ4pNreIOiApFChOgToV7NRG/tiEODjxRa6Xph9hHywTzNH1S8
hJl7TfynB2NfwPvKF03rwn+jtxkb2ugtCLBMtDIjGyj2lUMvF8BUzq+/czEpxbic
SVN63wb22ErsBq/SZ0K5SYd64E7rHhhtSXKwrTGyWADorheJHkhH2Z12twBbVSCK
OQAGk+kCxC9E2ochVsezrT0MkacFEnFeU/H0CUXUB6Q2XP2Ir8BDy8LStqo3UEv8
TdmZR/78JOdd0sve+XUU95mP3xSOxA==
=PzEc
-----END PGP SIGNATURE-----

Artyom V. Poptsov wrote 3 years ago
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 56172@debbugs.gnu.org)
87k0932m5p.fsf@gmail.com
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>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmK4xFIACgkQ6cWi2QiY
oC9qBQgAh2tmDkNonDAdtZN+sgkEwtOwTzxGsyUxF0NazQUwpnt6sRw3xf9u2Kfi
5jz9qX/z2yqw7sL99fKtwq0B3Px65w8ODDo9H5dK1q4Aj+EpNzhMLpLPATLuIUIv
HGyCSvHdPYRqOGJdFbE2jmzvUyFvy35g3jB74sQDgD+Biiiz6YrmXV7+/Sz3HR39
c7aQbsHryo+NUFfMDrv2tkG3ReWS4jUfFQ2j/2b0ZXTdKzNGv/JXYmjWuH4xTurG
LLyhgxjRABxbXeGpPGhEie1rBp4h1FeGglGDn8/3irFf0T56L5uw0lOEk4N40WM0
VYoWLckSTrP7duIjjt4SY7dKmSW2XQ==
=FXSP
-----END PGP SIGNATURE-----

Ludovic Courtès wrote 3 years ago
Re: bug#56172: [PATCH]: gnu: Add utest-h
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
87v8sezdb9.fsf_-_@gnu.org
Hi Artyom,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> skribis:

Toggle quote (7 lines)
> 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.

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

Thanks,
Ludo’.
Toggle diff (14 lines)
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))))
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 56172@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 56172
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help