From patchwork Fri Jul 12 07:23:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: chris X-Patchwork-Id: 29214 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A589627BBE2; Fri, 12 Jul 2024 08:26:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1B4D027BBE9 for ; Fri, 12 Jul 2024 08:26:29 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSAfO-0002UU-6g; Fri, 12 Jul 2024 03:26:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSAfK-0002TN-O9 for guix-patches@gnu.org; Fri, 12 Jul 2024 03:26:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sSAfJ-0001PK-N0 for guix-patches@gnu.org; Fri, 12 Jul 2024 03:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sSAfJ-0002mV-K6 for guix-patches@gnu.org; Fri, 12 Jul 2024 03:26:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69975] [PATCH] gnu: Add bash-unit. References: In-Reply-To: Resent-From: chris Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 Jul 2024 07:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69975 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69975@debbugs.gnu.org Cc: chris Received: via spool by 69975-submit@debbugs.gnu.org id=B69975.172076910710619 (code B ref 69975); Fri, 12 Jul 2024 07:26:01 +0000 Received: (at 69975) by debbugs.gnu.org; 12 Jul 2024 07:25:07 +0000 Received: from localhost ([127.0.0.1]:53112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSAeQ-0002lB-Oo for submit@debbugs.gnu.org; Fri, 12 Jul 2024 03:25:07 -0400 Received: from mx.kolabnow.com ([212.103.80.154]:34872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSAeN-0002kZ-6M for 69975@debbugs.gnu.org; Fri, 12 Jul 2024 03:25:05 -0400 Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 92B32282DF34 for <69975@debbugs.gnu.org>; Fri, 12 Jul 2024 09:24:56 +0200 (CEST) Authentication-Results: ext-mx-out011.mykolab.com (amavis); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20240523; t=1720769093; x=1722583494; bh=TV5DKQNJaQ+9sD58msahoyqud4qhZBrwPKXSnI3E2g8=; b=BDDgPrWajTuQ 6EBVv3ZuUo6JqTS0GY7jrHHlkroJARTu/3/0htSuKVSUt5vCB6vvGKjWlPfNdLfY LQ0Hw0jnVs8wxH1nYiFu7Tcrk7H3+IrSYq9g45CWZEqPKZLeFtzF5NJ0o3EeIwWE 9BXSR9TtMbQQaDmPwXz9A5M2kcdKP8ec17+Di9RKolVoDdoqRaaLYskuD1vNrimM Y1J603o7iEpMA5Tv8zaAJLerWnXC35pMKPQdY/z31/oFqSAXDPmPgWvG3ZhzHsRq gBwWy40CrxPVkkBCS8F3IOPmvXxn3ECFiJMIxanaXvJh1JCX9+YVxzQgz+BKvkD2 8A7e9X+Jsw== X-Virus-Scanned: amavis at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id 6bXIjr0-T8Ms for <69975@debbugs.gnu.org>; Fri, 12 Jul 2024 09:24:53 +0200 (CEST) Received: from int-mx011.mykolab.com (unknown [10.9.13.11]) by mx.kolabnow.com (Postfix) with ESMTPS id 792E2282DF31 for <69975@debbugs.gnu.org>; Fri, 12 Jul 2024 09:24:51 +0200 (CEST) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx011.mykolab.com (Postfix) with ESMTPS id A01283073F76 for <69975@debbugs.gnu.org>; Fri, 12 Jul 2024 09:24:51 +0200 (CEST) From: chris Date: Fri, 12 Jul 2024 00:23:12 -0700 Message-ID: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/bash.scm (bash-unit): New variable. Change-Id: Ic4185a2364922b03efe7f528e474ac9e71cbf66c --- gnu/packages/bash.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) base-commit: 2d6a3799fcda5c017f653c6e96b91964b07a7ee0 diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 9ecec0a484..a497c77b67 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2020 Zhu Zihao ;;; Copyright © 2021 Marius Bakke ;;; Copyright © 2024 Oleg Pykhalov +;;; Copyright © 2024 chris ;;; ;;; This file is part of GNU Guix. ;;; @@ -48,6 +49,7 @@ (define-module (gnu packages bash) #:use-module (guix monads) #:use-module (guix store) #:use-module (guix build-system gnu) + #:use-module (guix build-system copy) #:use-module (guix build-system trivial) #:autoload (guix gnupg) (gnupg-verify*) #:autoload (guix base32) (bytevector->nix-base32-string) @@ -487,3 +489,33 @@ (define-public blesh which replaces the default GNU Readline. It adds syntax highlighting, auto suggestions, vim modes, and more to Bash interactive sessions.") (license license:bsd-3))) + +(define-public bash-unit + (package + (name "bash-unit") + (version "2.3.1") + (home-page "https://github.com/pgrange/bash_unit") + (source + (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "16vaw9lc7g43g9va1kxbzxqs6b1mawsj4gqi8izz9km3dkbn3pli")))) + (build-system copy-build-system) + (arguments + `(#:install-plan '(("bash_unit" "bin/")) + #:phases (modify-phases %standard-phases + (add-before 'install 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./bash_unit" "tests/test_core.sh")) #t))))) + (inputs (list bash-minimal)) + (synopsis "Bash unit testing framework") + (description + "@command{bash_unit} allows you to write unit tests, run them and, in case of + failure, display the stack trace with source file and line number indications + to locate the problem.") + (license license:gpl3+)))