Skip to content

Commit

Permalink
Enable compression of test suite data.
Browse files Browse the repository at this point in the history
  • Loading branch information
slewsys committed Jan 19, 2025
1 parent a4c1ba6 commit 9f848dd
Show file tree
Hide file tree
Showing 68 changed files with 117 additions and 91,772 deletions.
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,37 @@ Makefile
/testsuite/*.ok-at
/testsuite/*.err-at
/testsuite/*.fail-at
/testsuite/*.ok-co-at
/testsuite/*.ok-ef-at
/testsuite/*.ok-mf-at
/testsuite/*.ok-r-at
/testsuite/*.ok-so-at
/testsuite/*.ok-xm-at
/testsuite/sigpipe.d
/testsuite/l1.r
/testsuite/n1.r
/testsuite/o.tmp
/testsuite/p1.r
/testsuite/proto.ok-at.in
/testsuite/v2.r
/testsuite/zb1.r
/testsuite/zb2.r
/testsuite/zb3.r
/testsuite/zb4.r
/testsuite/zb5.r
/testsuite/zb6.r
/testsuite/zb7.r
/testsuite/zbh1.r
/testsuite/zbh2.r
/testsuite/zf1.r
/testsuite/zf2.r
/testsuite/zf3.r
/testsuite/zf4.r
/testsuite/zf5.r
/testsuite/zf6.r
/testsuite/zf7.r
/testsuite/zfh1.r
/testsuite/zfh2.r
**/.deps/**
**/*.a
**/*.o
Expand Down
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ AC_ARG_WITH([included-regex],
[AS_HELP_STRING([--with-included-regex],
[use GNU regex library included here])],
[], [with_included_regex=check])
AC_MSG_RESULT([$with_included_regex])
if test ! ."$with_included_regex" = .'yes'; then
AC_CHECK_FUNCS([regcomp],
[with_included_regex=no],
[with_included_regex=yes
AC_MSG_WARN([System regex not found, falling back to included version])])
fi
AC_MSG_RESULT([$with_included_regex])
if test ."$with_included_regex" = .'yes'; then
ln -sf POTFILES-regex.in po/POTFILES.in
else
Expand Down Expand Up @@ -449,6 +449,7 @@ AC_CONFIG_FILES([ \
po/Makefile.in \
src/Makefile \
testsuite/Makefile \
testsuite/proto.ok-at.in \
testsuite/proto.ok-so-at.in])

AC_OUTPUT
76 changes: 46 additions & 30 deletions testsuite/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ ED_SCRIPTSdir = $(srcdir)
# Templates for generating autotest .at scripts.
AT_PROTO_OK = $(ED_SCRIPTSdir)/proto.ok-at.in
AT_PROTO_OK_CO = $(ED_SCRIPTSdir)/proto.ok-co-at.in
AT_PROTO_OK_SO = $(ED_SCRIPTSdir)/proto.ok-so-at.in
AT_PROTO_OK_EF = $(ED_SCRIPTSdir)/proto.ok-ef-at.in
AT_PROTO_OK_MF = $(ED_SCRIPTSdir)/proto.ok-mf-at.in
AT_PROTO_OK_R = $(ED_SCRIPTSdir)/proto.ok-r-at.in
AT_PROTO_OK_SO = $(ED_SCRIPTSdir)/proto.ok-so-at.in
AT_PROTO_OK_XM = $(ED_SCRIPTSdir)/proto.ok-xm-at.in
AT_PROTO_ERR = $(ED_SCRIPTSdir)/proto.err-at.in
AT_PROTO_FAIL = $(ED_SCRIPTSdir)/proto.fail-at.in


SUFFIXES = .t .tco .tso .tmf .tr .txm .err .ok-at .ok-co-at \
.ok-so-at .ok-mf-at .ok-r-at .ok-xm-at .err-at .fail-at
SUFFIXES = .t .tco .tef .tmf .tr .tso .txm .err .ok-at .ok-co-at \
.ok-ef-at .ok-mf-at .ok-r-at .ok-so-at .ok-xm-at \
.err-at .fail-at

# The following GNU make rules generate a location-independent version
# of testsuite which is invoked from $(top_builddir) via:
Expand All @@ -40,9 +42,9 @@ SUFFIXES = .t .tco .tso .tmf .tr .txm .err .ok-at .ok-co-at \
>"$@".tmp
mv "$@".tmp "$@"

.tso.ok-so-at:
.tef.ok-ef-at:
sed -e "s^@SCRIPT_NAME@^$*^g" \
-e "s^@SCRIPT_SRC@^$(abs_srcdir)/$*^g" "$(AT_PROTO_OK_SO)" \
-e "s^@SCRIPT_SRC@^$(abs_srcdir)/$*^g" "$(AT_PROTO_OK_EF)" \
>"$@".tmp
mv "$@".tmp "$@"

Expand All @@ -58,6 +60,12 @@ SUFFIXES = .t .tco .tso .tmf .tr .txm .err .ok-at .ok-co-at \
>"$@".tmp
mv "$@".tmp "$@"

.tso.ok-so-at:
sed -e "s^@SCRIPT_NAME@^$*^g" \
-e "s^@SCRIPT_SRC@^$(abs_srcdir)/$*^g" "$(AT_PROTO_OK_SO)" \
>"$@".tmp
mv "$@".tmp "$@"

.txm.ok-xm-at:
sed -e "s^@SCRIPT_NAME@^$*^g" \
-e "s^@SCRIPT_SRC@^$(abs_srcdir)/$*^g" "$(AT_PROTO_OK_XM)" \
Expand All @@ -78,22 +86,19 @@ SUFFIXES = .t .tco .tso .tmf .tr .txm .err .ok-at .ok-co-at \

# Ed scripts which should complete sucessfully.
ED_SCRIPTS_OK = \
addr.t ascii.t a.t bang1.t bang2.t bang3.t bang4.t \
c1.t c2.t comment.t delim.t d.t e1.t e2.t e3.t e4.t e5.t \
g1.t g2.t g3.t g4.t g5.t g6.t i1.t i2.t j.t k.t m.t nl1.t \
nl2.t nl3.t nl4.t q2.t r1.t r2.t r3.t s1.t s2.t s3.t s4.t \
s5.t s6.t s7.t s8.t t1.t t2.t u.t v1.t v2.t w.t
addr.t ascii.t a.t bang1.t c1.t c2.t comment.t delim.t \
d.t e1.t e2.t e3.t e4.t e5.t g1.t g2.t g3.t g4.t g5.t g6.t \
i1.t i2.t j.t k.t m.t nl1.t nl2.t nl3.t nl4.t q2.t \
r1.t r2.t r3.t s1.t s2.t s3.t s4.t s5.t s6.t s7.t s8.t \
t1.t t2.t u.t v1.t v2.t w.t

# Ed scripts tested for expected standard output.
ED_SCRIPTS_OK_CO = \
sigpipe.tco

# Ed scripts tested for expected standard output.
ED_SCRIPTS_OK_SO = \
p1.tso l1.tso n1.tso \
zf1.tso zf2.tso zf3.tso zf4.tso zf5.tso zf6.tso zf7.tso \
zb1.tso zb2.tso zb3.tso zb4.tso zb5.tso zb6.tso zb7.tso \
zfh1.tso zfh2.tso zbh1.tso zbh2.tso
# Ed scripts which should complete sucessfully if external filter is available.
ED_SCRIPTS_OK_EF = \
ef1.tef ef2.tef ef3.tef

# Ed scripts which should complete sucessfully if file globbing is available.
ED_SCRIPTS_OK_MF = \
Expand All @@ -103,6 +108,13 @@ ED_SCRIPTS_OK_MF = \
ED_SCRIPTS_OK_R = \
rmt1.tr rmt2.tr rmt3.tr

# Ed scripts tested for expected standard output.
ED_SCRIPTS_OK_SO = \
p1.tso l1.tso n1.tso \
zf1.tso zf2.tso zf3.tso zf4.tso zf5.tso zf6.tso zf7.tso \
zb1.tso zb2.tso zb3.tso zb4.tso zb5.tso zb6.tso zb7.tso \
zfh1.tso zfh2.tso zbh1.tso zbh2.tso

# Ed scripts which should complete sucessfully if macros are available.
ED_SCRIPTS_OK_XM = \
mac1.txm mac2.txm mac3.txm
Expand Down Expand Up @@ -130,20 +142,22 @@ ED_SCRIPTS_RESULTS_PIPED = $(wildcard *.rr)
# corresponding autotest template (cf. $(TESTSUITE_AT) rule below).
AT_SCRIPTS_OK = $(ED_SCRIPTS_OK:.t=.ok-at)
AT_SCRIPTS_OK_CO = $(ED_SCRIPTS_OK_CO:.tco=.ok-co-at)
AT_SCRIPTS_OK_SO = $(ED_SCRIPTS_OK_SO:.tso=.ok-so-at)
AT_SCRIPTS_OK_EF = $(ED_SCRIPTS_OK_EF:.tef=.ok-ef-at)
AT_SCRIPTS_OK_MF = $(ED_SCRIPTS_OK_MF:.tmf=.ok-mf-at)
AT_SCRIPTS_OK_R = $(ED_SCRIPTS_OK_R:.tr=.ok-r-at)
AT_SCRIPTS_OK_SO = $(ED_SCRIPTS_OK_SO:.tso=.ok-so-at)
AT_SCRIPTS_OK_XM = $(ED_SCRIPTS_OK_XM:.txm=.ok-xm-at)
AT_SCRIPTS_ERR = $(ED_SCRIPTS_ERR:.err=.err-at)
AT_SCRIPTS_FAIL = $(ED_SCRIPTS_ERR:.err=.fail-at)

# Dynamically generated data.
AT_SCRIPTS_OK_CO_D = $(ED_SCRIPTS_OK_CO:.tco=.d)
AT_SCRIPTS_OK_SO_R = $(ED_SCRIPTS_OK_SO:.tso=.r)

EXTRA_DIST = \
$(AT_PROTO_OK) $(AT_PROTO_OK_CO) $(AT_PROTO_OK_SO).in \
$(AT_PROTO_OK_MF) $(AT_PROTO_OK_R) $(AT_PROTO_OK_XM) \
$(AT_PROTO_ERR) $(AT_PROTO_FAIL) \
$(AT_PROTO_OK) $(AT_PROTO_OK_CO) $(AT_PROTO_OK_EF) \
$(AT_PROTO_OK_MF) $(AT_PROTO_OK_R) $(AT_PROTO_OK_SO).in \
$(AT_PROTO_OK_XM) $(AT_PROTO_ERR) $(AT_PROTO_FAIL) \
$(ED_SCRIPTS_OK) $(ED_SCRIPTS_OK_SO) $(ED_SCRIPTS_OK_MF) \
$(ED_SCRIPTS_OK_R) $(ED_SCRIPTS_OK_XM) \
$(ED_SCRIPTS_ERR) $(ED_SCRIPTS_FAIL) $(ED_SCRIPTS_DATA) \
Expand Down Expand Up @@ -190,17 +204,18 @@ $(TESTSUITE): $(TESTSUITE_AT) $(PACKAGE_M4)
$(AUTOTEST) -I $(ED_SCRIPTSdir) "$@".at -o "$@".tmp
mv "$@".tmp "$@"

$(TESTSUITE_AT): $(AT_SCRIPTS_OK) $(AT_SCRIPTS_OK_CO) $(AT_SCRIPTS_OK_SO) \
$(AT_SCRIPTS_OK_MF) $(AT_SCRIPTS_OK_R) $(AT_SCRIPTS_OK_XM) \
$(AT_SCRIPTS_ERR) $(AT_SCRIPTS_FAIL)
$(TESTSUITE_AT): $(AT_SCRIPTS_OK) $(AT_SCRIPTS_OK_CO) $(AT_SCRIPTS_OK_EF) \
$(AT_SCRIPTS_OK_MF) $(AT_SCRIPTS_OK_R) $(AT_SCRIPTS_OK_SO) \
$(AT_SCRIPTS_OK_XM) $(AT_SCRIPTS_ERR) $(AT_SCRIPTS_FAIL)
{ \
echo 'AT_INIT'; \
echo 'AT_TESTED([ed])'; \
} >"$@".tmp
for scpt in $(AT_SCRIPTS_OK) $(AT_SCRIPTS_OK_CO) \
$(AT_SCRIPTS_OK_SO) $(AT_SCRIPTS_OK_MF) \
$(AT_SCRIPTS_OK_R) $(AT_SCRIPTS_OK_XM) \
$(AT_SCRIPTS_ERR) $(AT_SCRIPTS_FAIL); do \
$(AT_SCRIPTS_OK_EF) $(AT_SCRIPTS_OK_MF) \
$(AT_SCRIPTS_OK_R) $(AT_SCRIPTS_OK_SO) \
$(AT_SCRIPTS_OK_XM) $(AT_SCRIPTS_ERR) \
$(AT_SCRIPTS_FAIL); do \
echo "m4_include([$$scpt])"; \
done >>"$@".tmp
mv "$@".tmp "$@"
Expand All @@ -217,13 +232,14 @@ $(PACKAGE_M4): $(top_srcdir)/configure.ac
mv "$@".tmp "$@"

distclean-local:
rm -f atconfig proto.ok-so-at.in
rm -f atconfig proto.ok-at.in proto.ok-so-at.in

clean-local:
rm -f *.ok-at *.ok-co-at *.ok-so-at *.ok-mf-at *.ok-r-at \
*.ok-xm-at *.fail-at *.err-at *.log
rm -f *.ok-at *.ok-co-at *.ok-ef-at *.ok-mf-at *.ok-r-at \
*.ok-so-at *.ok-xm-at *.fail-at *.err-at *.log
rm -rf *.dir tmpwrk*
rm -f $(AT_SCRIPTS_OK_CO_D)
rm -f $(PACKAGE_M4) $(TESTSUITE_AT) $(TESTSUITE)
rm -f $(AT_SCRIPTS_OK_CO_D) $(AT_SCRIPTS_OK_SO_R)


install:
2 changes: 1 addition & 1 deletion testsuite/e1.r
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
E script-e1
/H/;+d
/H/;/^E/-d
wq e1.o
2 changes: 1 addition & 1 deletion testsuite/e1.t
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
E script-e1
/H/;+d
/H/;/^E/-d
2 changes: 1 addition & 1 deletion testsuite/e5.r
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
E script-e5
r !echo %
/H/;+d
/H/;/^E/-d
wq e5.o
script-e5
2 changes: 1 addition & 1 deletion testsuite/e5.t
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
E script-e5
r !echo %
/H/;+d
/H/;/^E/-d
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 9f848dd

Please sign in to comment.