summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2014-01-28 18:55:11 +0200
committerEli Zaretskii <eliz@gnu.org>2014-01-28 18:55:11 +0200
commit6520f31b24575ce7308a8b42c8b617568db6c4d8 (patch)
tree177f4336ee16ceb219e69503e306ef8238c20ccd
parentc5530f370ba70004c2e0bbc712038eaacfd6b2ce (diff)
downloadgawk-6520f31b24575ce7308a8b42c8b617568db6c4d8.tar.gz
Fix the test suite for the pc ports.
test/strftime.awk: If DATECMD variable is non-empty, use it instead of the literal "date" as the 'date'-like command. pc/Makefile.tst (strftime): Pass the value of 'date' command through the DATECMD variable. (readdir): Adapt to changes in test/readdir0.awk.
-rw-r--r--pc/ChangeLog6
-rw-r--r--pc/Makefile.tst8
-rw-r--r--test/ChangeLog5
-rw-r--r--test/strftime.awk6
4 files changed, 21 insertions, 4 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog
index c18e087e..5f75283f 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,9 @@
+2014-01-28 Eli Zaretskii <eliz@gnu.org>
+
+ * Makefile.tst (strftime): Pass the value of 'date' command
+ through the DATECMD variable.
+ (readdir): Adapt to changes in test/readdir0.awk.
+
2014-01-20 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.tst (mbprintf4, backbigs1, backsmalls1): Add warning
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index c0ec07a1..e843eaa7 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -439,7 +439,7 @@ strftime::
# (LC_ALL=C date) | $(AWK) -v OUTPUT=_$@ -f "$(srcdir)"/strftime.awk
@GAWKLOCALE=C; export GAWKLOCALE; \
TZ=GMT0; export TZ; \
- (LC_ALL=C $(DATE)) | $(AWK) -v OUTPUT=_$@ -f "$(srcdir)"/strftime.awk
+ $(AWK) -v OUTPUT=_$@ -v DATECMD="$(DATE)" -f "$(srcdir)"/strftime.awk
@-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0
litoct::
@@ -1039,8 +1039,10 @@ readdir:
@echo $@
@echo This test may fail on MinGW if $(LS) does not report full Windows file index as the inode
@$(AWK) -f "$(srcdir)"/readdir.awk $(top_srcdir) > _$@
-# @ls -afli $(top_srcdir) | sed 1d | $(AWK) -f "$(srcdir)"/readdir0.awk -v extout=_$@ $(top_srcdir) > $@.ok
- @$(LS) -afli $(top_srcdir) | sed 1d | $(AWK) -f "$(srcdir)"/readdir0.awk -v extout=_$@ $(top_srcdir) > $@.ok
+ @$(LS) -afi "$(top_srcdir)" > _dirlist
+ @$(LS) -lna "$(top_srcdir)" | sed 1d > _longlist
+ @$(AWK) -f "$(srcdir)"/readdir0.awk -v extout=_$@ \
+ -v dirlist=_dirlist -v longlist=_longlist > $@.ok
@-$(CMP) $@.ok _$@ && rm -f $@.ok _$@
fts:
diff --git a/test/ChangeLog b/test/ChangeLog
index d9ecfe5f..ff57e6da 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-28 Eli Zaretskii <eliz@gnu.org>
+
+ * strftime.awk: If DATECMD variable is non-empty, use it instead
+ of the literal "date" as the 'date'-like command.
+
2014-01-19 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (mpfrnegzero): New test.
diff --git a/test/strftime.awk b/test/strftime.awk
index a52957f0..73cdc698 100644
--- a/test/strftime.awk
+++ b/test/strftime.awk
@@ -8,7 +8,11 @@
BEGIN {
maxtries = 10
- datecmd = "date"
+ # On DOS/Windows, DATECMD is set by the Makefile to point to
+ # Unix-like 'date' command.
+ datecmd = DATECMD
+ if (datecmd == "")
+ datecmd = "date"
fmt = "%a %b %d %H:%M:%S %Z %Y"
# loop until before equals after, thereby protecting