Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/regress/make-shell regress/make-shell: reuse the shell...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3c5d7ee718fc
branches:  trunk
changeset: 430532:3c5d7ee718fc
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri May 01 19:40:27 2020 +0000

description:
regress/make-shell: reuse the shell tests from the platform tests

diffstat:

 regress/make-shell/Makefile |  13 +++++++++++--
 regress/make-shell/spec     |   5 ++---
 2 files changed, 13 insertions(+), 5 deletions(-)

diffs (51 lines):

diff -r 0f7f1bb3a1a4 -r 3c5d7ee718fc regress/make-shell/Makefile
--- a/regress/make-shell/Makefile       Fri May 01 19:28:15 2020 +0000
+++ b/regress/make-shell/Makefile       Fri May 01 19:40:27 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2020/05/01 19:28:15 rillig Exp $
+# $NetBSD: Makefile,v 1.3 2020/05/01 19:40:27 rillig Exp $
 #
 # This regression test demonstrates which features are supported by the
 # shell that is used internally by devel/bmake.  That shell may be
@@ -14,11 +14,12 @@
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 COMMENT=       Test features of the shell used by bmake
+LICENSE=       2-clause-bsd
 
 WRKSRC=                ${WRKDIR}
 PLIST_SRC=     # none
 
-do-regress:
+do-build:
        # Up to May 2020, shell functions were not used in package
        # Makefiles.  But could they?
        ${RUN} func() { :; }; func
@@ -38,4 +39,12 @@
                : "That's expected";                                    \
        fi
 
+       # Run the same tests as for ${SH}.
+       # These tests assume that they run in a temporary directory
+       # and that all platform tools can be called by their plain name.
+       # If these tests fail because of missing tools, add these to
+       # USE_TOOLS.
+       ${RUN} cd ${WRKSRC};                                            \
+       . "${PKGSRCDIR}/regress/tools-platform/sh.test"
+
 .include "../../mk/bsd.pkg.mk"
diff -r 0f7f1bb3a1a4 -r 3c5d7ee718fc regress/make-shell/spec
--- a/regress/make-shell/spec   Fri May 01 19:28:15 2020 +0000
+++ b/regress/make-shell/spec   Fri May 01 19:40:27 2020 +0000
@@ -1,9 +1,8 @@
-# $NetBSD: spec,v 1.1 2020/05/01 19:16:47 rillig Exp $
+# $NetBSD: spec,v 1.2 2020/05/01 19:40:27 rillig Exp $
 #
 
 do_test() {
-       $TEST_MAKE do-regress 1> "$TEST_OUTFILE" 2>&1 \
-       || TEST_EXITSTATUS=$?
+       $TEST_MAKE 1> "$TEST_OUTFILE" 2>&1 || TEST_EXITSTATUS=$?
 }
 
 do_cleanup() {



Home | Main Index | Thread Index | Old Index