diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/check.scm | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 797fe71277..c73d886567 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -38,6 +38,7 @@ ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr> ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be> +;;; Copyright © 2022 David Elsing <david.elsing@posteo.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -491,6 +492,63 @@ a multi-paradigm automated test framework for C++ and Objective-C.") a multi-paradigm automated test framework for C++ and Objective-C.") (license license:boost1.0))) +(define-public cbehave + (let ((commit "5deaea0eaaf52f1c5ccdac0c68c003988f348fb4") + (revision "1")) + (package + (name "cbehave") + (version (git-version "0.2.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/bigwhite/cbehave") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0kicawxmxn059n3rmfc7r2q5wfjrqbr6lm8dmsi86ba76ak0f9gi")) + (snippet + #~(begin + (for-each delete-file + '("aclocal.m4" + "config.guess" "config.sub" "configure" + "depcomp" "install-sh" + "libtool" "ltmain.sh" "missing" + "Makefile.in" "src/Makefile.in" + "src/example/Makefile.in")))))) + (build-system gnu-build-system) + (arguments + (list + #:configure-flags #~(list "--enable-shared" "--disable-static") + #:phases + #~(modify-phases %standard-phases + (add-before 'bootstrap 'rename-configure.in + (lambda _ + (rename-file "configure.in" "configure.ac"))) + (add-after 'rename-configure.in 'set-AM_PROG_AR + (lambda _ + (substitute* "configure.ac" + (("^AC_PROG_LIBTOOL.*" orig) + (string-append "AM_PROG_AR\n" orig))))) + (add-after 'set-AM_PROG_AR 'enable-tests + (lambda _ + (let ((port (open-file "src/example/Makefile.am" "a"))) + (display (string-append "\nTESTS = calculator_test" + " text_editor_test string_test" + " product_database_test mock_test\n") + port) + (close-port port)))) + (add-before 'check 'create-dummy-file + (lambda _ + (invoke "touch" "src/example/foo.txt")))))) + (native-inputs (list autoconf automake libtool)) + (home-page "https://github.com/bigwhite/cbehave") + (synopsis "Behavior-driven development framework") + (description "CBehave is a behavior-driven development implemented in C. +It allows the specification of behaviour scenarios using a given-when-then +pattern.") + (license license:apsl2)))) + (define-public cmdtest (package (name "cmdtest") |