diff mbox series

[bug#62473,1/4] gnu: Add ftest.

Message ID 0102018722050cc0-117d37b0-6764-48a9-816d-c4b5bf1152c6-000000@eu-west-1.amazonses.com
State New
Headers show
Series [bug#62473,1/4] gnu: Add ftest. | expand

Commit Message

reza March 27, 2023, 7:42 a.m. UTC
From: Reza Housseini <reza.housseini@gmail.com>

---
 gnu/packages/check.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

-- 
2.39.2
diff mbox series

Patch

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 0c8777a074..9b58b2c09d 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -43,6 +43,7 @@ 
 ;;; Copyright © 2022 jgart <jgart@dismail.de>
 ;;; Copyright © 2023 Luis Felipe López Acevedo <luis.felipe.la@protonmail.com>
 ;;; Copyright © 2023 Timo Wilken <guix@twilken.net>
+;;; Copyright © 2023 Reza Housseini <reza@housseini.me>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -65,6 +66,7 @@  (define-module (gnu packages check)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
@@ -92,6 +94,7 @@  (define-module (gnu packages check)
   #: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 glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
@@ -3531,6 +3534,7 @@  (define-public python-pytest-regressions
 that can be used to verify that future runs produce the same data.")
     (license license:expat)))
 
+
 (define-public guile-proba
   (package
     (name "guile-proba")
@@ -3606,3 +3610,33 @@  (define-public guile-proba
 to run test collections, and a library that includes a test runner and
 helpers for writing tests.")
     (license license:public-domain)))
+
+
+(define-public ftest
+  (package
+    (name "ftest")
+    (version "bf75576064fce2e07f52cd63a3e410f12358728b")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/nemtrif/ftest")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "01yjhjnlq2gci8hkc6favwj0axq7y1vvnradsgcffby6h09x00b4"))))
+    (build-system copy-build-system)
+    (native-inputs (list cmake-minimal))
+    (arguments
+     `(#:install-plan '(("ftest.h" "include/ftest/"))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'install 'check
+                    (lambda _
+                      (with-directory-excursion "tests"
+                        (invoke "cmake" ".")
+                        (invoke "make")
+                        (invoke "ctest")))))))
+    (home-page "https://github.com/nemtrif/ftest")
+    (synopsis "Simple and limited unit-test framework for C++")
+    (description "A simple and limited unit-test framework for C++")
+    (license license:asl2.0)))