From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1642329-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3DD7D15817D for <garchives@archives.gentoo.org>; Thu, 13 Jun 2024 19:53:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 88299E2A9C; Thu, 13 Jun 2024 19:53:24 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7213DE2A9C for <gentoo-commits@lists.gentoo.org>; Thu, 13 Jun 2024 19:53:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B220E33BE26 for <gentoo-commits@lists.gentoo.org>; Thu, 13 Jun 2024 19:53:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2E5121CD6 for <gentoo-commits@lists.gentoo.org>; Thu, 13 Jun 2024 19:53:22 +0000 (UTC) From: "Ulrich Müller" <ulm@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" <ulm@gentoo.org> Message-ID: <1718308395.2d60db117655b37a8c3864f68d30c199a5d3b802.ulm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/tests/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/tests/Makefile X-VCS-Directories: eclass/tests/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 2d60db117655b37a8c3864f68d30c199a5d3b802 X-VCS-Branch: master Date: Thu, 13 Jun 2024 19:53:22 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bbfab2e0-9782-448b-8b4f-08325c9cdd69 X-Archives-Hash: 6c25c374fc17b2965ae31804c3ba2202 commit: 2d60db117655b37a8c3864f68d30c199a5d3b802 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Thu Jun 13 19:40:54 2024 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Thu Jun 13 19:53:15 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d60db11 eclass/tests: Fail the .%.sh.ok Makefile recipe if the test fails With .ONESHELL active, only the return status of the final recipe line will be checked. Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> eclass/tests/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eclass/tests/Makefile b/eclass/tests/Makefile index e5d1c3915fe1..99e824dea86d 100644 --- a/eclass/tests/Makefile +++ b/eclass/tests/Makefile @@ -2,18 +2,20 @@ SH_FILES := $(wildcard *.sh) TEST_FILES := $(filter-out tests-common.sh version-funcs.sh, $(SH_FILES)) TEST_OK_FILES := $(patsubst %.sh, .%.sh.ok,$ $(TEST_FILES)) +# !!! _All_ recipe lines for each target will be provided to a single +# !!! invocation of the shell. +.ONESHELL: + # We cache a successful test result if the testfile itself did not # change (%.sh) and the contents of the eclass/ directory did not # change (.eclasssum). .%.sh.ok: %.sh .eclasssum - ./$< - touch $@ + ./$< && touch $@ .PHONY: test test: $(TEST_OK_FILES) .PHONY: force -.ONESHELL: .eclasssum: SHELL = /bin/bash .eclasssum: force set -euo pipefail