pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/regress/show-all regress/show-all: demonstrate wrong o...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a8fc5da3484d
branches:  trunk
changeset: 413488:a8fc5da3484d
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Mar 20 15:45:12 2020 +0000

description:
regress/show-all: demonstrate wrong output of show-all

A real-life example of this pattern is EXTRACT_CMD_DEFAULT, which refers
to DOWNLOADED_DISTFILE, which is defined as "$${extract_file}".

Until mk/extract/extract.mk r1.40, that argument was discarded from the
output completely. With the surrounding quotes at least the quotes are
visible in the output of "bmake show-all-extract".

diffstat:

 regress/show-all/Makefile |  11 ++++++++++-
 regress/show-all/spec     |  21 ++++++++++++++++++++-
 2 files changed, 30 insertions(+), 2 deletions(-)

diffs (63 lines):

diff -r bb16d2f77e80 -r a8fc5da3484d regress/show-all/Makefile
--- a/regress/show-all/Makefile Fri Mar 20 15:44:10 2020 +0000
+++ b/regress/show-all/Makefile Fri Mar 20 15:45:12 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2018/11/30 19:15:49 rillig Exp $
+# $NetBSD: Makefile,v 1.4 2020/03/20 15:45:12 rillig Exp $
 
 DISTNAME=      show-all-1.0
 CATEGORIES=    regress
@@ -33,4 +33,13 @@
 _SORTED_VARS.regress=  *_ENV.*
 _LISTED_VARS.regress=  *_ARGS.*
 
+SHELLVAR_PLAIN=                "$$var $${var} $$other"
+SHELLVAR_ENV=          "$$var $${var} $$other"
+SHELLVAR_ARGS=         "$$var $${var} $$other"
+
+_VARGROUPS+=           shellvar
+_PKG_VARS.shellvar=    SHELLVAR_PLAIN SHELLVAR_ENV SHELLVAR_ARGS
+_SORTED_VARS.shellvar= *_ENV
+_LISTED_VARS.shellvar= *_ARGS
+
 .include "../../mk/bsd.pkg.mk"
diff -r bb16d2f77e80 -r a8fc5da3484d regress/show-all/spec
--- a/regress/show-all/spec     Fri Mar 20 15:44:10 2020 +0000
+++ b/regress/show-all/spec     Fri Mar 20 15:45:12 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: spec,v 1.2 2018/11/11 19:07:12 rillig Exp $
+# $NetBSD: spec,v 1.3 2020/03/20 15:45:12 rillig Exp $
 
 tmpdir=${TMPDIR:-/tmp}/pkgsrc-show-all
 rm -rf "$tmpdir"
@@ -16,6 +16,7 @@
 
 do_test() {
        $TEST_MAKE show-all-regress > "$tmpdir/show-all-regress.out"
+       $TEST_MAKE show-all-shellvar > "$tmpdir/show-all-shellvar.out"
 }
 
 check_result() {
@@ -68,4 +69,22 @@
        # parsing shell commands, and that would be just too much.
 
        require_file "$tmpdir/show-all-regress.out" --equals "$tmpdir/expected"
+
+
+       # TODO: What the heck is going on here?
+       # The output of the ENV and ARGS cases should be the same as in PLAIN.
+       #
+       cat <<'EOF' > "$tmpdir/expected"
+shellvar:
+  pkg  SHELLVAR_PLAIN=         "$var ${var} $other"
+  pkg  SHELLVAR_ENV=           \
+                               ".MAKE.LEVEL.ENVar  ther" \
+                               # end of SHELLVAR_ENV (sorted)
+  pkg  SHELLVAR_ARGS=          \
+                               ".MAKE.LEVEL.ENVar  ther" \
+                               # end of SHELLVAR_ARGS
+
+EOF
+
+       require_file "$tmpdir/show-all-shellvar.out" --equals "$tmpdir/expected"
 }



Home | Main Index | Thread Index | Old Index