[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-671
From: |
Eli Zaretskii |
Subject: |
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-671-g8dfb80a |
Date: |
Fri, 17 Apr 2015 14:02:35 +0000 |
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, gawk-4.1-stable has been updated
via 8dfb80aa04885ae1cbdda07fb24026066b440cdf (commit)
from 16f0b3187f01bda5401b7e6f56ebb6d6fe15d147 (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=8dfb80aa04885ae1cbdda07fb24026066b440cdf
commit 8dfb80aa04885ae1cbdda07fb24026066b440cdf
Author: Eli Zaretskii <address@hidden>
Date: Fri Apr 17 17:00:48 2015 +0300
Fix bogus failures of test suite on MS-Windows
* testoutcmp.awk (END): Attempt a series of massages on the actual
output to match it to the expected result, when the number of
exponent digits is different. Also, edit "nul" into "null", to
account for the difference in the null device name. This removes
"failures" due to Windows-specific issues that do not indicate
real problems in Gawk, just some non-portable assumptions about
the expected results.
* Makefile.tst (profile5, exit, hsprint, posix, double2, fmttest): Remove
the "expect to fail" message for MinGW, and use the testoutcmp.awk
script to loosely compare actual output to expected one.
diff --git a/pc/ChangeLog b/pc/ChangeLog
index f28d2a4..b6ecad8 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,7 +1,18 @@
2015-04-17 Eli Zaretskii <address@hidden>
+ * testoutcmp.awk (END): Attempt a series of massages on the actual
+ output to match it to the expected result, when the number of
+ exponent digits is different. Also, edit "nul" into "null", to
+ account for the difference in the null device name. This removes
+ "failures" due to Windows-specific issues that do not indicate
+ real problems in Gawk, just some non-portable assumptions about
+ the expected results.
+
* Makefile.tst (abs_top_builddir): Define.
(negtime): Mark this test as an expected failure with MinGW.
+ (profile5, exit, hsprint, posix, double2, fmttest): Remove the
+ "expect to fail" message for MinGW, and use the testoutcmp.awk
+ script to loosely compare actual output to expected one.
* Makefile.ext ($(SIMPLE_EXTENSIONS)): Really use -static-libgcc.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 6a39231..0e837a7 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -904,10 +904,10 @@ profile4:
profile5:
@echo $@
- @echo Expect profile5 to fail with MinGW due to 3 digits in %e output
@GAWK_NO_PP_RUN=1 $(AWK) address@hidden -f "$(srcdir)"/address@hidden >
/dev/null
@sed 1,2d < address@hidden > _$@; rm address@hidden
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+# @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+ @-$(TESTOUTCMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
profile6:
@echo $@
@@ -935,7 +935,8 @@ exit:
@echo $@
@echo Expect exit to fail with MinGW due to null vs nul difference
@-AWK="$(AWKPROG)" "$(srcdir)"/address@hidden > _$@ 2>&1
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+# @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+ @-$(TESTOUTCMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
rri1::
@echo $@
@@ -1638,9 +1639,9 @@ hex:
hsprint:
@echo $@
- @echo Expect hsprint to fail with MinGW due to 3 digits in %e output
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+# @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+ @-$(TESTOUTCMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
inputred:
@echo $@
@@ -2418,9 +2419,9 @@ patsplit:
posix:
@echo $@
- @echo Expect posix to fail with MinGW due to 3 digits in e+NNN exponent
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+# @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+ @-$(TESTOUTCMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
printfbad1:
@echo $@
@@ -2545,9 +2546,9 @@ double1:
double2:
@echo $@
- @echo Expect double2 to fail with MinGW due to 3 digits in e+NNN
exponents
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+# @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+ @-$(TESTOUTCMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
intformat:
@echo $@
@@ -2566,9 +2567,9 @@ asorti:
fmttest:
@echo $@
- @echo Expect fmttest to fail with MinGW due to 3 digits in e+NNN
exponents
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+# @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+ @-$(TESTOUTCMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
fnarydel:
@echo $@
@@ -2681,7 +2682,7 @@ diffout:
diff -c "$(srcdir)"/$${base}.ok $$i ; \
fi ; \
fi ; \
- done | more
+ done | less
# convenient way to scan valgrind results for errors
valgrind-scan:
diff --git a/pc/testoutcmp.awk b/pc/testoutcmp.awk
index 33dcaa3..d4bbadd 100644
--- a/pc/testoutcmp.awk
+++ b/pc/testoutcmp.awk
@@ -1,7 +1,8 @@
# cmp replacement program for PC where the error messages aren't
-# exactly the same. should run even on old awk
+# exactly the same, and neither are e+NNN exponents.
+# should run even on old awk
#
-# Copyright (C) 2011 the Free Software Foundation, Inc.
+# Copyright (C) 2011-2015 the Free Software Foundation, Inc.
#
# This file is part of GAWK, the GNU implementation of the
# AWK Programming Language.
@@ -35,6 +36,7 @@ END {
exit 1
}
+ status = 0;
for (i = 1; i <= FNR; i++) {
good = lines[0, i]
actual = lines[1, i]
@@ -46,12 +48,33 @@ END {
l--
if (substr(good, 1, l) == substr(actual, 1, l))
continue
+
+ # For exponents
+ actual1 = gensub(/( ?)([-+]?[0-9.][0-9.]?+e[-+])0([0-9][0-9])/,
" \\1\\2\\3", "g", actual)
+ if (good == actual1)
+ continue
+ actual1 = gensub(/([-+]?0)([0-9.]+e[-+])0([0-9][0-9])/,
"\\10\\2\\3", "g", actual)
+ if (good == actual1)
+ continue
+ actual1 = gensub(/(
?)([-+]?)([1-9.][0-9.]?+e[-+])0([0-9][0-9])/, "\\1\\20\\3\\4", "g", actual)
+ if (good == actual1)
+ continue
+ actual1 = gensub(/([-+]?[0-9.]+e[-+])0([0-9][0-9])/, "\\1\\2 ",
"g", actual)
+ if (good == actual1)
+ continue
+ actual1 = gensub(/([-+]?[0-9.]+e[-+])0([0-9][0-9])/, "\\1\\2",
"g", actual)
+ if (good == actual1)
+ continue
+ # For exit test
+ actual1 = gensub(/([01]) nul/, "\\1 null", "g", actual)
+ if (good == actual1)
+ continue
else {
- printf("%s and %s are not equal\n", ARGV[1],
- ARGV[2]) > "/dev/stderr"
- exit 1
+ printf("-%s\n", good) > "/dev/stderr"
+ printf("+%s\n", actual) > "/dev/stderr"
+ status = 1
}
}
- exit 0
+ exit status
}
-----------------------------------------------------------------------
Summary of changes:
pc/ChangeLog | 11 +++++++++++
pc/Makefile.tst | 25 +++++++++++++------------
pc/testoutcmp.awk | 35 +++++++++++++++++++++++++++++------
3 files changed, 53 insertions(+), 18 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-671-g8dfb80a,
Eli Zaretskii <=