Received: by mail.netbsd.org (Postfix, from userid 605) id 0CB5184D9C; Fri, 1 May 2020 19:16:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 8785284D41 for ; Fri, 1 May 2020 19:16:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id LXbkmtuZwQ3y for ; Fri, 1 May 2020 19:16:48 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 0533384CD2 for ; Fri, 1 May 2020 19:16:47 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id E6789FB27; Fri, 1 May 2020 19:16:47 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1588360607274840" MIME-Version: 1.0 Date: Fri, 1 May 2020 19:16:47 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/regress/make-shell To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20200501191647.E6789FB27@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1588360607274840 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Fri May 1 19:16:47 UTC 2020 Added Files: pkgsrc/regress/make-shell: Makefile spec Log Message: regress/make-shell: regression test for the shell used by devel/bmake To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 pkgsrc/regress/make-shell/Makefile \ pkgsrc/regress/make-shell/spec Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1588360607274840 Content-Disposition: inline Content-Length: 1735 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Added files: Index: pkgsrc/regress/make-shell/Makefile diff -u /dev/null pkgsrc/regress/make-shell/Makefile:1.1 --- /dev/null Fri May 1 19:16:47 2020 +++ pkgsrc/regress/make-shell/Makefile Fri May 1 19:16:47 2020 @@ -0,0 +1,32 @@ +# $NetBSD: Makefile,v 1.1 2020/05/01 19:16:47 rillig Exp $ +# +# This regression test demonstrates which features are supported by the +# shell that is used internally by devel/bmake. That shell may be +# different from /bin/sh and ${SH} and TOOLS_PLATFORM.sh. +# +# This is most interesting for platforms whose /bin/sh is so broken that +# it is basically unusable, such as SunOS 10 and earlier. + +DISTNAME= make-shell-2020.05.01 +CATEGORIES= regress +MASTER_SITES= # none +DISTFILES= # none + +MAINTAINER= pkgsrc-users@NetBSD.org +COMMENT= Test features of the shell used by bmake + +WRKSRC= ${WRKDIR} +PLIST_SRC= # none + +do-regress: + # Up to May 2020, shell functions were not used in package + # Makefiles. But could they? + ${RUN} func() { :; }; func + + # The Solaris /bin/sh cannot handle these word expansions. + # Therefore on Solaris, bmake uses /usr/xpg4/bin/sh instead. + # Make sure that these don't produce a syntax error. + ${RUN} path="1/2/3/4"; one=$${path%%/*} + ${RUN} path="1/2/3/4"; four=$${path##*/} + +.include "../../mk/bsd.pkg.mk" Index: pkgsrc/regress/make-shell/spec diff -u /dev/null pkgsrc/regress/make-shell/spec:1.1 --- /dev/null Fri May 1 19:16:47 2020 +++ pkgsrc/regress/make-shell/spec Fri May 1 19:16:47 2020 @@ -0,0 +1,15 @@ +# $NetBSD: spec,v 1.1 2020/05/01 19:16:47 rillig Exp $ +# + +do_test() { + $TEST_MAKE do-regress 1> "$TEST_OUTFILE" 2>&1 \ + || TEST_EXITSTATUS=$? +} + +do_cleanup() { + $TEST_MAKE clean +} + +check_result() { + exit_status 0 +} --_----------=_1588360607274840--