From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 17 Dec 2024 09:18:57 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tNSnB-0099yu-0l for lore@lore.pengutronix.de; Tue, 17 Dec 2024 09:18:57 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1tNSnB-0007dP-EC; Tue, 17 Dec 2024 09:18:57 +0100 Received: from mail.thorsis.com ([217.92.40.78]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tNSmr-0007cC-2n for ptxdist@pengutronix.de; Tue, 17 Dec 2024 09:18:37 +0100 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id F3C0F1483140 for ; Tue, 17 Dec 2024 09:18:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1734423513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=o6HwlJXqIESrUxsJ5rWyviXLclzHNKuyD8kMeb9Iw+0=; b=mXM2Br/2KToNrO+zQHhGAUmNA1UdNwL78XCAE+sUFL6aUQ5FeYZxw8bhkVbXFZyDqEqpNS 1+T10qQIW/nBIW2vBtNpNKwZlFeLsP2+BXghnefKSRDnJ0MdAnW0DgJ3n0S0z9bjcEep/x /vAX2FLG31q5BrFNTRfKOdCgMRzjuvHo28/doUBuGi9sErK6L/7I/IfIpS40BeSWQd4Qa2 48QpKUqRSkVi3quuD/1L0Pb6KN9ABJZ8QIzN/deXiXvhT/n5GkikmK200k3x2EaOzrrHfY I26Zt7+hTfpkqiW7GGdnmWD9YU/ZtUvQsvSSKZnlhCKSk4YkfgWXrkMbroCSvg== From: Alexander Dahl To: ptxdist@pengutronix.de Date: Tue, 17 Dec 2024 09:18:25 +0100 Message-Id: <20241217081825.2032612-1-ada@thorsis.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_SBL,URIBL_SBL_A autolearn=no autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH] sharness: Add new package X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Allows to run unit tests for shell scripts on embedded target as well. Signed-off-by: Alexander Dahl Link: https://felipec.github.io/sharness/ --- rules/sharness.in | 13 +++++++++++ rules/sharness.make | 56 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 rules/sharness.in create mode 100644 rules/sharness.make diff --git a/rules/sharness.in b/rules/sharness.in new file mode 100644 index 000000000..7c400584c --- /dev/null +++ b/rules/sharness.in @@ -0,0 +1,13 @@ +## SECTION=test_suites + +config SHARNESS + tristate + prompt "sharness" + help + Sharness is a portable shell library to write, run, and + analyze automated tests for Unix programs. + Since all tests output TAP, the Test Anything Protocol, + they can be run with any TAP harness. + Each test is written as a shell script. + +# vim: ft=kconfig noet tw=72 ts=8 sw=8 diff --git a/rules/sharness.make b/rules/sharness.make new file mode 100644 index 000000000..70195b872 --- /dev/null +++ b/rules/sharness.make @@ -0,0 +1,56 @@ +# -*-makefile-*- +# +# Copyright (C) 2024 by Alexander Dahl +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_SHARNESS) += sharness + +# +# Paths and names +# +SHARNESS_VERSION := 1.2.1 +SHARNESS_MD5 := b816b21b278688b80453dfd5fbb69556 +SHARNESS := sharness-$(SHARNESS_VERSION) +SHARNESS_SUFFIX := tar.gz +SHARNESS_URL := https://github.com/felipec/sharness/archive/refs/tags/v$(SHARNESS_VERSION).$(SHARNESS_SUFFIX) +SHARNESS_SOURCE := $(SRCDIR)/$(SHARNESS).$(SHARNESS_SUFFIX) +SHARNESS_DIR := $(BUILDDIR)/$(SHARNESS) +SHARNESS_LICENSE := GPL-2.0-or-later +SHARNESS_LICENSE_FILES := file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +SHARNESS_CONF_TOOL := NO +SHARNESS_INSTALL_OPT := prefix=/usr install + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/sharness.targetinstall: + @$(call targetinfo) + + @$(call install_init, sharness) + @$(call install_fixup, sharness,PRIORITY,optional) + @$(call install_fixup, sharness,SECTION,base) + @$(call install_fixup, sharness,AUTHOR,"Alexander Dahl ") + @$(call install_fixup, sharness,DESCRIPTION,missing) + + @$(call install_copy, sharness, 0, 0, 0644, -, \ + /usr/share/sharness/sharness.sh) + @$(call install_copy, sharness, 0, 0, 0644, -, \ + /usr/share/sharness/lib-sharness/functions.sh) + + @$(call install_finish, sharness) + + @$(call touch) + +# vim: ft=make noet tw=72 ts=8 sw=8 base-commit: b922a1e6bf2c7764c3e6032557b259f755464be3 -- 2.39.5