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-3088-g8e728b4
Date: Wed, 18 Apr 2018 11:16:38 -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  8e728b43e4a19921497ae3242336c2b364f81c08 (commit)
      from  1426282b06f3907ec2af2ab2aab94c361754ed1d (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=8e728b43e4a19921497ae3242336c2b364f81c08

commit 8e728b43e4a19921497ae3242336c2b364f81c08
Author: Arnold D. Robbins <address@hidden>
Date:   Wed Apr 18 18:16:13 2018 +0300

    Further improvements in pc/Makefile.tst generation.

diff --git a/pc/ChangeLog b/pc/ChangeLog
index a46a384..8a462a3 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -3,6 +3,12 @@
        * config.sed: Add HAVE_STDBOOL_H for MinGW.
        * config.h: Ditto.
 
+       Unrelated:
+
+       * Makefile.tst.prologue (SORT): New macro.
+       * GenMakefileTst.awk: Add processing of TESOUTCMP for recipes
+       that need it.
+
 2018-04-17         Arnold D. Robbins     <address@hidden>
 
        * Makefile.tst.prologue, Makefile.tst: Update copyright years.
diff --git a/pc/GenMakefileTst.awk b/pc/GenMakefileTst.awk
index a273a88..557be0f 100644
--- a/pc/GenMakefileTst.awk
+++ b/pc/GenMakefileTst.awk
@@ -37,8 +37,18 @@ BEGIN {
        next
 }
 
+# Tests that need a different cmp program
+/^NEED_TESTOUTCMP *=/,/[^\\]$/ {
+       print
+       gsub(/(^NEED_TESTOUTCMP *=|\\$)/,"")
+       for (i = 1; i <= NF; i++)
+               testoutcmp[$i]
+
+       next
+}
+
 # Start of a target
-! in_recipe && /^[[:alpha:]_][[:alnum:]_]*:/ {
+! in_recipe && /^[[:alpha:]_][-[:alnum:]_]*:/ {
        in_recipe = 1
        start_new_recipe()
        next
@@ -53,7 +63,7 @@ in_recipe && /^[[:alpha:]_][[:alnum:]_]*:/ {
 
 # Collect recipe lines
 in_recipe && /^\t/ {
-       recipe_lines[++line] = substitutions($0)
+       recipe_lines[++line] = substitutions(name, $0)
        next
 }
 
@@ -71,7 +81,7 @@ process               { print }
 
 # substitutions --- replace *nix values with what's needed on Windows
 
-function substitutions(string)
+function substitutions(test, string)
 {
        # locales
        gsub(/en_US.UTF-8/, "ENU_USA.1252", string)
@@ -83,6 +93,11 @@ function substitutions(string)
        # command for `ls'
        gsub(/@ls/, "@$(LS)", string)
 
+       if (string ~ /\$\(CMP\)/ && test in testoutcmp) {
+               gsub(/\$\(CMP\)/, "$(TESTOUTCMP)", string)
+               delete testoutcmp[test]
+       }
+
        return string
 }
 
diff --git a/pc/Makefile.tst.prologue b/pc/Makefile.tst.prologue
index 96d9149..7762c0c 100644
--- a/pc/Makefile.tst.prologue
+++ b/pc/Makefile.tst.prologue
@@ -117,6 +117,9 @@ MKDIR = mkdir
 #DATE = date
 DATE = gdate
 
+# Set sort command
+SORT = sort
+
 # MS-DOS and OS/2 use ; as a PATH delimiter
 PATH_SEPARATOR = ;
 
diff --git a/test/ChangeLog b/test/ChangeLog
index f5262a1..4fc2b8d 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,10 @@
+2018-04-18         Arnold D. Robbins     <address@hidden>
+
+       * Makefile.am (NEED_TESTOUTCMP): New list of tests that need
+       a different cmp program.
+       (charasbytes): Add -v BINMODE=2.
+       (longwrds): Need an explicit recipe to have sort command.
+
 2018-04-17         Arnold D. Robbins     <address@hidden>
 
        * nonfatal1.awk, nonfatal1.ok: Add a bunch of bad characters
diff --git a/test/Makefile.am b/test/Makefile.am
index 9fae9cf..9bc5864 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1406,6 +1406,10 @@ GENTESTS_UNUSED = Makefile.in checknegtime.awk 
dtdgport.awk gtlnbufv.awk \
        hello.awk inchello.awk inclib.awk inplace.1.in inplace.2.in \
        inplace.in printfloat.awk readdir0.awk valgrind.awk xref.awk
 
+# List of tests on MinGW or DJGPP that need a different cmp program
+NEED_TESTOUTCMP = \
+       beginfile2 double2 exit fmttest hsprint posix profile5 space
+
 CMP = cmp
 AWKPROG = ../gawk$(EXEEXT)
 
@@ -2060,10 +2064,11 @@ fts:
        @$(AWK) -f "$(srcdir)"/fts.awk || echo EXIT CODE: $$? >> _$@
        @-$(CMP) address@hidden _$@ && rm -f address@hidden _$@
 
+# BINMODE=2 is needed for PC tests.
 charasbytes:
        @echo $@
        @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE; \
-       AWKPATH="$(srcdir)" $(AWK) -b -f address@hidden 
"$(srcdir)"/address@hidden | \
+       AWKPATH="$(srcdir)" $(AWK) -b -v BINMODE=2 -f address@hidden 
"$(srcdir)"/address@hidden | \
        od -c -t x1 | tr '      ' ' ' | sed -e 's/  */ /g' -e 's/ *$$//' >_$@ 
2>&1 || echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
@@ -2177,6 +2182,12 @@ nlstringtest::
        fi
 
 
+longwrds:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden -v SORT="$(SORT)" < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
+
 # Targets generated for other tests:
 include Maketests
 
diff --git a/test/Makefile.in b/test/Makefile.in
index fd923d3..a72ffd6 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1666,6 +1666,11 @@ GENTESTS_UNUSED = Makefile.in checknegtime.awk 
dtdgport.awk gtlnbufv.awk \
        hello.awk inchello.awk inclib.awk inplace.1.in inplace.2.in \
        inplace.in printfloat.awk readdir0.awk valgrind.awk xref.awk
 
+
+# List of tests on MinGW or DJGPP that need a different cmp program
+NEED_TESTOUTCMP = \
+       beginfile2 double2 exit fmttest hsprint posix profile5 space
+
 CMP = cmp
 AWKPROG = ../gawk$(EXEEXT)
 
@@ -2504,10 +2509,11 @@ fts:
        @$(AWK) -f "$(srcdir)"/fts.awk || echo EXIT CODE: $$? >> _$@
        @-$(CMP) address@hidden _$@ && rm -f address@hidden _$@
 
+# BINMODE=2 is needed for PC tests.
 charasbytes:
        @echo $@
        @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE; \
-       AWKPATH="$(srcdir)" $(AWK) -b -f address@hidden 
"$(srcdir)"/address@hidden | \
+       AWKPATH="$(srcdir)" $(AWK) -b -v BINMODE=2 -f address@hidden 
"$(srcdir)"/address@hidden | \
        od -c -t x1 | tr '      ' ' ' | sed -e 's/  */ /g' -e 's/ *$$//' >_$@ 
2>&1 || echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
@@ -2617,6 +2623,11 @@ nlstringtest::
        else \
                $(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@ ; \
        fi
+
+longwrds:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden -v SORT="$(SORT)" < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 Gt-dummy:
 # file Maketests, generated from Makefile.am by the Gentests program
 addcomma:
@@ -3142,11 +3153,6 @@ longsub:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
-longwrds:
-       @echo $@
-       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
 manglprm:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 073f0e0..266e4a9 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -523,11 +523,6 @@ longsub:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
-longwrds:
-       @echo $@
-       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
-       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
 manglprm:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  < 
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/make.out.ok b/test/make.out.ok
index ecf4a94..903afba 100644
--- a/test/make.out.ok
+++ b/test/make.out.ok
@@ -6,7 +6,6 @@ Making check in .
 make[1]: Entering directory '/home/arnold/Gnu/gawk/gawk.git'
 make 'CFLAGS=-g -DARRAYDEBUG -DYYDEBUG -DLOCALEDEBUG' 'LDFLAGS=' check-local
 make[2]: Entering directory '/home/arnold/Gnu/gawk/gawk.git'
-make[2]: Nothing to be done for 'check-local'.
 make[2]: Leaving directory '/home/arnold/Gnu/gawk/gawk.git'
 make[1]: Leaving directory '/home/arnold/Gnu/gawk/gawk.git'
 Making check in extension

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

Summary of changes:
 pc/ChangeLog             |  6 ++++++
 pc/GenMakefileTst.awk    | 21 ++++++++++++++++++---
 pc/Makefile.tst.prologue |  3 +++
 test/ChangeLog           |  7 +++++++
 test/Makefile.am         | 13 ++++++++++++-
 test/Makefile.in         | 18 ++++++++++++------
 test/Maketests           |  5 -----
 test/make.out.ok         |  1 -
 8 files changed, 58 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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