aboutsummaryrefslogtreecommitdiffstats
path: root/test/Gentests
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-08-04 09:12:13 +0300
committerArnold D. Robbins <arnold@skeeve.com>2020-08-04 09:12:13 +0300
commit1316328fd5e4677a4096ee116ad411e6af10cc57 (patch)
treed6eb854f6078030fda63c924eced0d628330f309 /test/Gentests
parentc731b9eb6dbbc6683a4c5020b42fca0fb06427e7 (diff)
downloadegawk-1316328fd5e4677a4096ee116ad411e6af10cc57.tar.gz
egawk-1316328fd5e4677a4096ee116ad411e6af10cc57.tar.bz2
egawk-1316328fd5e4677a4096ee116ad411e6af10cc57.zip
Simplify test suite handling of -M and -mpfr.ok files.
Diffstat (limited to 'test/Gentests')
-rwxr-xr-xtest/Gentests33
1 files changed, 14 insertions, 19 deletions
diff --git a/test/Gentests b/test/Gentests
index 392cbf2a..ada51819 100755
--- a/test/Gentests
+++ b/test/Gentests
@@ -22,6 +22,13 @@ BEGIN {
# process the file Makefile.am:
+/^EXTRA_DIST *=/,/[^\\]$/ {
+ gsub(/(^EXTRA_DIST *=|\\$)/,"")
+ for (i = 1; i <= NF; i++)
+ extra_dist[$i]
+ next
+}
+
/^[[:upper:]_]*_TESTS *=/,/[^\\]$/ {
gsub(/(^[[:upper:]_]*_TESTS *=|\\$)/,"")
for (i = 1; i <= NF; i++)
@@ -108,15 +115,6 @@ BEGIN {
next
}
-/^CHECK_MPFR *=/,/[^\\]$/ {
- gsub(/(^CHECK_MPFR *=|\\$)/,"")
- for (i = 1; i <= NF; i++)
- {
- mpfr[$i]
- }
- next
-}
-
# Tests needing a particular locale
/^NEED_LOCALE_.* *=/,/[^\\]$/ {
if (/^NEED/)
@@ -255,16 +253,14 @@ function generate(x, s, i, locale_string)
}
}
- if (x in mpfr) {
- delete mpfr[x]
- printf "%s", locale_string
- printf "AWKPATH=\"$(srcdir)\" $(AWK) $(AWKFLAGS) -f $@.awk %s >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n", s
- printf "\t@-if test -z \"$$AWKFLAGS\" ; then $(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@ ; else \\\n"
- printf "\t$(CMP) \"$(srcdir)\"/$@-mpfr.ok _$@ && rm -f _$@ ; \\\n"
- printf "\tfi\n\n"
+ printf "%s", locale_string
+ printf "AWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk %s >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n", s
+
+ if ((x "-mpfr.ok") in extra_dist) {
+ printf "\t@-if echo \"$$GAWK_TEST_ARGS\" | egrep -q -e '-M|--bignum' > /dev/null ; \\\n"
+ printf "\tthen $(CMP) \"$(srcdir)\"/$@-mpfr.ok _$@ && rm -f _$@ ; \\\n"
+ printf "\telse $(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@ ; fi\n\n"
} else {
- printf "%s", locale_string
- printf "AWKPATH=\"$(srcdir)\" $(AWK) -f $@.awk %s >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n", s
printf "\t@-$(CMP) \"$(srcdir)\"/$@.ok _$@ && rm -f _$@\n\n"
}
}
@@ -297,7 +293,6 @@ END {
for (x in nondec)
if (!(x in targets))
printf "WARNING: --non-decimal-data target `%s' is missing.\n", x > "/dev/stderr"
-
for (x in re_interval)
if (!(x in targets))
printf "WARNING: --re-interval target `%s' is missing.\n", x > "/dev/stderr"