symm/*-def.h: Overhaul encryption mode testing.
[catacomb] / symm / Makefile.am
index 0e56319..3db9f3f 100644 (file)
@@ -32,6 +32,11 @@ nodist_libsymm_la_SOURCES =
 
 TEST_LIBS               = libsymm.la
 
+noinst_LTLIBRARIES     += libsymmtest.la
+libsymmtest_la_SOURCES  =
+libsymmtest_la_CFLAGS   = $(AM_CFLAGS) -DSRCDIR=\"$(srcdir)\"
+TEST_LIBS              += libsymmtest.la
+
 VPATH                  += $(srcdir)/modes
 
 ###--------------------------------------------------------------------------
@@ -592,6 +597,9 @@ MAINTAINERCLEANFILES        += $(GENMODES_H)
 pkginclude_HEADERS     += $(GENMODES_H)
 $(GENMODES_H): modes/gen-stamp
 
+## Additional test machinery.
+libsymmtest_la_SOURCES += modes-test.c modes-test.h
+
 ###--------------------------------------------------------------------------
 ### Autogenerated stub headers.
 
@@ -649,9 +657,13 @@ gmactab.c: gthingtab.c.in Makefile.am
 ## Run the test programs.
 TESTS                  += $(SYMM_TESTS)
 EXTRA_DIST             += $(SYMM_TEST_FILES)
+EXTRA_DIST             += $(REGRESSION_TEST_FILES)
 
-## A piece of sample text for round-trip testing encryption modes.
-EXTRA_DIST             += daftstory.h
+t/modes/%.regress:
+       $(MAKE) modes/$*.t && \
+               mkdir -p $(srcdir)/t/modes/ && \
+               modes/$*.t -o$(srcdir)/$@.new && \
+               mv $(srcdir)/$@.new $(srcdir)/$@
 
 ## Clean the debris from the `modes' subdirectory.
 CLEANFILES             += modes/*.to modes/*.t$(EXEEXT)