gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, feature/improve-tests, updated. gawk-4.1


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, feature/improve-tests, updated. gawk-4.1.0-3052-g232820f
Date: Thu, 5 Apr 2018 05:23:55 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, feature/improve-tests has been updated
       via  232820f99817f4c62cdafce8c15aca8435c3cb9f (commit)
      from  88d107d052085c6343b2c5c39807e743e02d3c36 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=232820f99817f4c62cdafce8c15aca8435c3cb9f

commit 232820f99817f4c62cdafce8c15aca8435c3cb9f
Author: Arnold D. Robbins <address@hidden>
Date:   Thu Apr 5 12:23:25 2018 +0300

    Automate --debug and --non-decimal-data tests.

diff --git a/test/ChangeLog b/test/ChangeLog
index 2f0c377..cbc218c 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2018-04-05         Arnold D. Robbins     <address@hidden>
+
+       * Gentests: Add support for tests needing --debug and
+       --non-decimal-data.
+       * Makefile.am (NEED_DEBUG, NEED_NONDEC):  New macros.
+
 2018-04-04         Arnold D. Robbins     <address@hidden>
 
        * Gentests: Add support for tests needing --pretty-print.
diff --git a/test/Gentests b/test/Gentests
index ec52dea..3e51a7f 100755
--- a/test/Gentests
+++ b/test/Gentests
@@ -24,6 +24,13 @@ BEGIN {
        next
 }
 
+/^NEED_DEBUG *=/,/[^\\]$/ {
+       gsub(/(^NEED_DEBUG *=|\\$)/,"")
+       for (i = 1; i <= NF; i++)
+               debug[$i]
+       next
+}
+
 /^NEED_LINT *=/,/[^\\]$/ {
        gsub(/(^NEED_LINT *=|\\$)/,"")
        for (i = 1; i <= NF; i++)
@@ -47,6 +54,13 @@ BEGIN {
        next
 }
 
+/^NEED_NONDEC *=/,/[^\\]$/ {
+       gsub(/(^NEED_NONDEC *=|\\$)/,"")
+       for (i = 1; i <= NF; i++)
+               nondec[$i]
+       next
+}
+
 /^NEED_PRETTY *=/,/[^\\]$/ {
        gsub(/(^NEED_PRETTY *=|\\$)/,"")
        for (i = 1; i <= NF; i++)
@@ -141,6 +155,14 @@ function generate(x,       s)
                s = s " --pretty-print=_$@"
                delete pretty[x]
        }
+       if (x in debug) {
+               s = s " --debug"
+               delete debug[x]
+       }
+       if (x in nondec) {
+               s = s " --non-decimal-data"
+               delete nondec[x]
+       }
        if (x".in" in files) {
                s = s " < \"$(srcdir)\"/address@hidden"
                delete files[x".in"]
@@ -179,6 +201,12 @@ END {
        for (x in pretty)
                if (!(x in targets))
                        printf "WARNING: --pretty-print target `%s' is 
missing.\n", x > "/dev/stderr"
+       for (x in debug)
+               if (!(x in targets))
+                       printf "WARNING: --debug target `%s' is missing.\n", x 
> "/dev/stderr"
+       for (x in nondec)
+               if (!(x in targets))
+                       printf "WARNING: --non-decimal-data target `%s' is 
missing.\n", x > "/dev/stderr"
        for (x in files)
                if (!(x in unused) && \
                    !(gensub(/\.(awk|in)$/,"",1,x) in targets))
diff --git a/test/Makefile.am b/test/Makefile.am
index f0b2943..e2a9a28 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1328,6 +1328,9 @@ SHLIB_TESTS = \
        revtwoway rwarray \
        testext time
 
+# List of the tests which should be run with --debug option:
+NEED_DEBUG = dbugtypedre1 dbugtypedre2 dbugeval2 symtab10
+
 # List of the tests which should be run with --lint option:
 NEED_LINT = \
        defref fmtspcl lintexp lintindex lintint lintlength lintwarn \
@@ -1341,6 +1344,9 @@ NEED_MPFR = mpfrbigint mpfrexprange mpfrfield mpfrieee 
mpfrmemok1 \
        mpfrnegzero mpfrnr mpfrrem mpfrrnd mpfrrndeval mpfrsort mpfrsqrt \
        mpfrstrtonum mpgforcenum mpfruplus
 
+# List of tests that need --non-decimal-data
+NEED_NONDEC = nondec2 intarray forcenum
+
 # List of tests that need --posix
 NEED_POSIX = printf0 posix2008sub paramasfunc1 paramasfunc2 muldimposix
 
@@ -1835,21 +1841,6 @@ rtlenmb::
        "$(srcdir)"/rtlen.sh >_$@ || echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
-nondec2::
-       @echo $@
-       @$(AWK) --non-decimal-data -v a=0x1 -f "$(srcdir)"/address@hidden >_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
-intarray::
-       @echo $@
-       @$(AWK) --non-decimal-data -f "$(srcdir)"/address@hidden >_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
-forcenum::
-       @echo $@
-       @$(AWK) --non-decimal-data -f "$(srcdir)"/address@hidden >_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
 nofile::
        @echo $@
        @$(AWK) '{}' no/such/file >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -2301,21 +2292,6 @@ negtime::
        @TZ=GMT AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo 
EXIT CODE: $$? >>_$@
        @AWKPATH="$(srcdir)" $(AWK) -f checknegtime.awk 
"$(srcdir)"/address@hidden _$@ && rm -f _$@
 
-dbugtypedre1:
-       @echo $@
-       @AWKPATH="$(srcdir)" $(AWK) -D -f address@hidden < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
-dbugtypedre2:
-       @echo $@
-       @AWKPATH="$(srcdir)" $(AWK) -D -f address@hidden < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
-dbugeval2:
-       @echo $@
-       @AWKPATH="$(srcdir)" $(AWK) -D -f address@hidden < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
 watchpoint1:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -D -f address@hidden 
$(srcdir)/address@hidden < $(srcdir)/address@hidden >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
@@ -2339,11 +2315,6 @@ pty2:
        $(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@ ;; \
        esac
 
-symtab10:
-       @echo $@
-       @AWKPATH="$(srcdir)" $(AWK) -D -f address@hidden < 
"$(srcdir)/address@hidden" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
 ignrcas3::
        @echo $@
        @if locale -a | grep el_GR.iso88597 > /dev/null ; then \
diff --git a/test/Makefile.in b/test/Makefile.in
index fdd9546..4e5cfb7 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1582,6 +1582,9 @@ SHLIB_TESTS = \
        testext time
 
 
+# List of the tests which should be run with --debug option:
+NEED_DEBUG = dbugtypedre1 dbugtypedre2 dbugeval2 symtab10
+
 # List of the tests which should be run with --lint option:
 NEED_LINT = \
        defref fmtspcl lintexp lintindex lintint lintlength lintwarn \
@@ -1597,6 +1600,9 @@ NEED_MPFR = mpfrbigint mpfrexprange mpfrfield mpfrieee 
mpfrmemok1 \
        mpfrstrtonum mpgforcenum mpfruplus
 
 
+# List of tests that need --non-decimal-data
+NEED_NONDEC = nondec2 intarray forcenum
+
 # List of tests that need --posix
 NEED_POSIX = printf0 posix2008sub paramasfunc1 paramasfunc2 muldimposix
 
@@ -2276,21 +2282,6 @@ rtlenmb::
        "$(srcdir)"/rtlen.sh >_$@ || echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
-nondec2::
-       @echo $@
-       @$(AWK) --non-decimal-data -v a=0x1 -f "$(srcdir)"/address@hidden >_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
-intarray::
-       @echo $@
-       @$(AWK) --non-decimal-data -f "$(srcdir)"/address@hidden >_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
-forcenum::
-       @echo $@
-       @$(AWK) --non-decimal-data -f "$(srcdir)"/address@hidden >_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
 nofile::
        @echo $@
        @$(AWK) '{}' no/such/file >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -2741,21 +2732,6 @@ negtime::
        @TZ=GMT AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo 
EXIT CODE: $$? >>_$@
        @AWKPATH="$(srcdir)" $(AWK) -f checknegtime.awk 
"$(srcdir)"/address@hidden _$@ && rm -f _$@
 
-dbugtypedre1:
-       @echo $@
-       @AWKPATH="$(srcdir)" $(AWK) -D -f address@hidden < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
-dbugtypedre2:
-       @echo $@
-       @AWKPATH="$(srcdir)" $(AWK) -D -f address@hidden < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
-dbugeval2:
-       @echo $@
-       @AWKPATH="$(srcdir)" $(AWK) -D -f address@hidden < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
 watchpoint1:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -D -f address@hidden 
$(srcdir)/address@hidden < $(srcdir)/address@hidden >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
@@ -2777,11 +2753,6 @@ pty2:
        $(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@ ;; \
        esac
 
-symtab10:
-       @echo $@
-       @AWKPATH="$(srcdir)" $(AWK) -D -f address@hidden < 
"$(srcdir)/address@hidden" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
 ignrcas3::
        @echo $@
        @if locale -a | grep el_GR.iso88597 > /dev/null ; then \
@@ -3999,6 +3970,21 @@ crlf:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+dbugeval2:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --debug < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
+dbugtypedre1:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --debug < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
+dbugtypedre2:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --debug < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 delsub:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
@@ -4009,6 +3995,11 @@ fieldwdth:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+forcenum:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --non-decimal-data >_$@ 
2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 fpat1:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -4204,6 +4195,11 @@ indirectcall2:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+intarray:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --non-decimal-data >_$@ 
2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 isarrayunset:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
@@ -4284,6 +4280,11 @@ nondec:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+nondec2:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --non-decimal-data >_$@ 
2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 nonfatal2:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
@@ -4469,6 +4470,11 @@ symtab7:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+symtab10:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --debug < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 typedregex1:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index fab160c..db3c113 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1182,6 +1182,21 @@ crlf:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+dbugeval2:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --debug < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
+dbugtypedre1:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --debug < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
+dbugtypedre2:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --debug < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 delsub:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
@@ -1192,6 +1207,11 @@ fieldwdth:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+forcenum:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --non-decimal-data >_$@ 
2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 fpat1:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -1387,6 +1407,11 @@ indirectcall2:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+intarray:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --non-decimal-data >_$@ 
2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 isarrayunset:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
@@ -1467,6 +1492,11 @@ nondec:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+nondec2:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --non-decimal-data >_$@ 
2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 nonfatal2:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
@@ -1652,6 +1682,11 @@ symtab7:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+symtab10:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  --debug < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 typedregex1:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
diff --git a/test/nondec2.awk b/test/nondec2.awk
index 681d283..23f9053 100644
--- a/test/nondec2.awk
+++ b/test/nondec2.awk
@@ -101,4 +101,8 @@
 # 
 # --------------enig9DEC74140126C224E7DE3E54--
 # 
+
+# Added 4/2018 to make script self contained
+BEGIN { a = "0x1" }
+
 BEGIN { print a+0 }

-----------------------------------------------------------------------

Summary of changes:
 test/ChangeLog   |  6 +++++
 test/Gentests    | 28 +++++++++++++++++++++
 test/Makefile.am | 41 +++++-------------------------
 test/Makefile.in | 76 ++++++++++++++++++++++++++++++--------------------------
 test/Maketests   | 35 ++++++++++++++++++++++++++
 test/nondec2.awk |  4 +++
 6 files changed, 120 insertions(+), 70 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]