junktesting support
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1240 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/examples/sample.makefile.regen b/examples/sample.makefile.regen
index a382423..b1f4a64 100755
--- a/examples/sample.makefile.regen
+++ b/examples/sample.makefile.regen
@@ -38,9 +38,9 @@
exit 1
fi
-EXTRA_CFLAGS=""
+EXTRA_CFLAGS="-DJUNKTEST"
if test -f config.h ; then
- EXTRA_CFLAGS="-DHAVE_CONFIG_H"
+ EXTRA_CFLAGS="-DHAVE_CONFIG_H ${EXTRA_CFLAGS}"
fi
set -x
@@ -64,7 +64,12 @@
echo " PROGNAME=${PROGNAME} \\"
echo " $0"
echo
- echo 'check: ${TARGET}'
+ echo 'check: ${TARGET} check-ber check-xer check-per'
+ echo ' @echo ================'
+ echo ' @echo All tests passed'
+ echo ' @echo ================'
+ echo
+ echo 'check-ber:'
echo " @if test -f sample-${ASN1PDU}-1.[db]er ; then \\"
echo " for f in sample-${ASN1PDU}-*.[db]er; do \\"
echo ' for b in 1 17 33 980 8192; do \'
@@ -73,7 +78,12 @@
echo ' ./${TARGET} -b $$b -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \'
echo ' diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \'
echo ' rm -f ./.tmp.[12].$$$$; \'
+ echo ' echo "Test junking $$f (please wait)..."; \'
+ echo ' ./${TARGET} -J0.0001 -n 1000 -b $$b -iber -onull $$f || exit 2; \'
+ echo ' ./${TARGET} -J0.001 -n 1000 -b $$b -iber -onull $$f || exit 2; \'
echo ' done; done; fi'
+ echo
+ echo 'check-xer:'
echo " @if test -f sample-${ASN1PDU}-1.xer ; then \\"
echo " for f in sample-${ASN1PDU}-*.xer; do \\"
echo ' for b in 1 17 33 980 8192; do \'
@@ -82,7 +92,12 @@
echo ' ./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \'
echo ' diff $$f ./.tmp.2.$$$$ || exit 2; \'
echo ' rm -f ./.tmp.[12].$$$$; \'
+ echo ' echo "Test junking $$f (please wait)..."; \'
+ echo ' ./${TARGET} -J0.0001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \'
+ echo ' ./${TARGET} -J0.001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \'
echo ' done; done; fi'
+ echo
+ echo 'check-per:'
echo " @if test -f sample-${ASN1PDU}-1.per ; then \\"
echo " for f in sample-${ASN1PDU}-[1-9].per; do \\"
echo ' for b in 1 17 33 980 8192; do \'
@@ -92,6 +107,9 @@
echo ' ./${TARGET} -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \'
echo ' diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \'
echo ' rm -f ./.tmp.[123].$$$$; \'
+ echo ' echo "Test junking $$f (please wait)..."; \'
+ echo ' ./${TARGET} -J0.0001 -n 1000 -b $$b -iper -onull $$f || exit 2; \'
+ echo ' ./${TARGET} -J0.001 -n 1000 -b $$b -iper -onull $$f || exit 2; \'
echo ' done; done; fi'
echo " @if test -f sample-${ASN1PDU}-1-padded.per ; then \\"
echo " for f in sample-*-[1-9]-padded.per; do \\"
@@ -103,10 +121,10 @@
echo ' ./${TARGET} -b $$b -p $$pdu -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 2; \'
echo ' diff $$f ./.tmp.1.$$$$ || exit 2; \'
echo ' rm -f ./.tmp.[12].$$$$; \'
+ echo ' echo "Test junking $$f (please wait)..."; \'
+ echo ' ./${TARGET} -J0.0001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \'
+ echo ' ./${TARGET} -J0.001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \'
echo ' done; done; fi'
- echo ' @echo ================'
- echo ' @echo All tests passed'
- echo ' @echo ================'
echo
echo "distclean: clean"
echo ' rm -f $(ASN_MODULE_SOURCES)'
diff --git a/examples/sample.source.LDAP3/Makefile b/examples/sample.source.LDAP3/Makefile
index 27810c0..ed190fc 100644
--- a/examples/sample.source.LDAP3/Makefile
+++ b/examples/sample.source.LDAP3/Makefile
@@ -163,7 +163,7 @@
# This file may be used as an input for make(3)
# Remove the lines below to convert it into a pure .am file
TARGET = ldap3dump
-CFLAGS += -DHAVE_CONFIG_H -DPDU=LDAPMessage -I.
+CFLAGS += -DHAVE_CONFIG_H -DJUNKTEST -DPDU=LDAPMessage -I.
OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o}
all: LDAPMessage.c $(TARGET)
@@ -199,7 +199,12 @@
PROGNAME=ldap3dump \
../sample.makefile.regen
-check: ${TARGET}
+check: ${TARGET} check-ber check-xer check-per
+ @echo ================
+ @echo All tests passed
+ @echo ================
+
+check-ber:
@if test -f sample-LDAPMessage-1.[db]er ; then \
for f in sample-LDAPMessage-*.[db]er; do \
for b in 1 17 33 980 8192; do \
@@ -208,7 +213,12 @@
./${TARGET} -b $$b -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -iber -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -iber -onull $$f || exit 2; \
done; done; fi
+
+check-xer:
@if test -f sample-LDAPMessage-1.xer ; then \
for f in sample-LDAPMessage-*.xer; do \
for b in 1 17 33 980 8192; do \
@@ -217,7 +227,12 @@
./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff $$f ./.tmp.2.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \
done; done; fi
+
+check-per:
@if test -f sample-LDAPMessage-1.per ; then \
for f in sample-LDAPMessage-[1-9].per; do \
for b in 1 17 33 980 8192; do \
@@ -227,6 +242,9 @@
./${TARGET} -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \
rm -f ./.tmp.[123].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -iper -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -iper -onull $$f || exit 2; \
done; done; fi
@if test -f sample-LDAPMessage-1-padded.per ; then \
for f in sample-*-[1-9]-padded.per; do \
@@ -238,10 +256,10 @@
./${TARGET} -b $$b -p $$pdu -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 2; \
diff $$f ./.tmp.1.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \
done; done; fi
- @echo ================
- @echo All tests passed
- @echo ================
distclean: clean
rm -f $(ASN_MODULE_SOURCES)
diff --git a/examples/sample.source.MEGACO/Makefile b/examples/sample.source.MEGACO/Makefile
index 3490054..2087e67 100644
--- a/examples/sample.source.MEGACO/Makefile
+++ b/examples/sample.source.MEGACO/Makefile
@@ -285,7 +285,7 @@
# This file may be used as an input for make(3)
# Remove the lines below to convert it into a pure .am file
TARGET = megacoDump
-CFLAGS += -DHAVE_CONFIG_H -DPDU=MegacoMessage -I.
+CFLAGS += -DHAVE_CONFIG_H -DJUNKTEST -DPDU=MegacoMessage -I.
OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o}
all: MegacoMessage.c $(TARGET)
@@ -321,7 +321,12 @@
PROGNAME=megacoDump \
../sample.makefile.regen
-check: ${TARGET}
+check: ${TARGET} check-ber check-xer check-per
+ @echo ================
+ @echo All tests passed
+ @echo ================
+
+check-ber:
@if test -f sample-MegacoMessage-1.[db]er ; then \
for f in sample-MegacoMessage-*.[db]er; do \
for b in 1 17 33 980 8192; do \
@@ -330,7 +335,12 @@
./${TARGET} -b $$b -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -iber -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -iber -onull $$f || exit 2; \
done; done; fi
+
+check-xer:
@if test -f sample-MegacoMessage-1.xer ; then \
for f in sample-MegacoMessage-*.xer; do \
for b in 1 17 33 980 8192; do \
@@ -339,7 +349,12 @@
./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff $$f ./.tmp.2.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \
done; done; fi
+
+check-per:
@if test -f sample-MegacoMessage-1.per ; then \
for f in sample-MegacoMessage-[1-9].per; do \
for b in 1 17 33 980 8192; do \
@@ -349,6 +364,9 @@
./${TARGET} -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \
rm -f ./.tmp.[123].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -iper -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -iper -onull $$f || exit 2; \
done; done; fi
@if test -f sample-MegacoMessage-1-padded.per ; then \
for f in sample-*-[1-9]-padded.per; do \
@@ -360,10 +378,10 @@
./${TARGET} -b $$b -p $$pdu -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 2; \
diff $$f ./.tmp.1.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \
done; done; fi
- @echo ================
- @echo All tests passed
- @echo ================
distclean: clean
rm -f $(ASN_MODULE_SOURCES)
diff --git a/examples/sample.source.MHEG5/Makefile b/examples/sample.source.MHEG5/Makefile
index 7617a6e..d34374f 100644
--- a/examples/sample.source.MHEG5/Makefile
+++ b/examples/sample.source.MHEG5/Makefile
@@ -453,7 +453,7 @@
# This file may be used as an input for make(3)
# Remove the lines below to convert it into a pure .am file
TARGET = mheg5dump
-CFLAGS += -DHAVE_CONFIG_H -DPDU=InterchangedObject -I.
+CFLAGS += -DHAVE_CONFIG_H -DJUNKTEST -DPDU=InterchangedObject -I.
OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o}
all: InterchangedObject.c $(TARGET)
@@ -489,7 +489,12 @@
PROGNAME=mheg5dump \
../sample.makefile.regen
-check: ${TARGET}
+check: ${TARGET} check-ber check-xer check-per
+ @echo ================
+ @echo All tests passed
+ @echo ================
+
+check-ber:
@if test -f sample-InterchangedObject-1.[db]er ; then \
for f in sample-InterchangedObject-*.[db]er; do \
for b in 1 17 33 980 8192; do \
@@ -498,7 +503,12 @@
./${TARGET} -b $$b -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -iber -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -iber -onull $$f || exit 2; \
done; done; fi
+
+check-xer:
@if test -f sample-InterchangedObject-1.xer ; then \
for f in sample-InterchangedObject-*.xer; do \
for b in 1 17 33 980 8192; do \
@@ -507,7 +517,12 @@
./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff $$f ./.tmp.2.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \
done; done; fi
+
+check-per:
@if test -f sample-InterchangedObject-1.per ; then \
for f in sample-InterchangedObject-[1-9].per; do \
for b in 1 17 33 980 8192; do \
@@ -517,6 +532,9 @@
./${TARGET} -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \
rm -f ./.tmp.[123].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -iper -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -iper -onull $$f || exit 2; \
done; done; fi
@if test -f sample-InterchangedObject-1-padded.per ; then \
for f in sample-*-[1-9]-padded.per; do \
@@ -528,10 +546,10 @@
./${TARGET} -b $$b -p $$pdu -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 2; \
diff $$f ./.tmp.1.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \
done; done; fi
- @echo ================
- @echo All tests passed
- @echo ================
distclean: clean
rm -f $(ASN_MODULE_SOURCES)
diff --git a/examples/sample.source.PKIX1/Makefile b/examples/sample.source.PKIX1/Makefile
index be46949..1a79ca7 100644
--- a/examples/sample.source.PKIX1/Makefile
+++ b/examples/sample.source.PKIX1/Makefile
@@ -345,7 +345,7 @@
# This file may be used as an input for make(3)
# Remove the lines below to convert it into a pure .am file
TARGET = x509dump
-CFLAGS += -DHAVE_CONFIG_H -DPDU=Certificate -I.
+CFLAGS += -DHAVE_CONFIG_H -DJUNKTEST -DPDU=Certificate -I.
OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o}
all: Certificate.c $(TARGET)
@@ -381,7 +381,12 @@
PROGNAME=x509dump \
../sample.makefile.regen
-check: ${TARGET}
+check: ${TARGET} check-ber check-xer check-per
+ @echo ================
+ @echo All tests passed
+ @echo ================
+
+check-ber:
@if test -f sample-Certificate-1.[db]er ; then \
for f in sample-Certificate-*.[db]er; do \
for b in 1 17 33 980 8192; do \
@@ -390,7 +395,12 @@
./${TARGET} -b $$b -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -iber -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -iber -onull $$f || exit 2; \
done; done; fi
+
+check-xer:
@if test -f sample-Certificate-1.xer ; then \
for f in sample-Certificate-*.xer; do \
for b in 1 17 33 980 8192; do \
@@ -399,7 +409,12 @@
./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff $$f ./.tmp.2.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \
done; done; fi
+
+check-per:
@if test -f sample-Certificate-1.per ; then \
for f in sample-Certificate-[1-9].per; do \
for b in 1 17 33 980 8192; do \
@@ -409,6 +424,9 @@
./${TARGET} -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \
rm -f ./.tmp.[123].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -iper -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -iper -onull $$f || exit 2; \
done; done; fi
@if test -f sample-Certificate-1-padded.per ; then \
for f in sample-*-[1-9]-padded.per; do \
@@ -420,10 +438,10 @@
./${TARGET} -b $$b -p $$pdu -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 2; \
diff $$f ./.tmp.1.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \
done; done; fi
- @echo ================
- @echo All tests passed
- @echo ================
distclean: clean
rm -f $(ASN_MODULE_SOURCES)
diff --git a/examples/sample.source.RRC/Makefile b/examples/sample.source.RRC/Makefile
index 5c6234f..bd8251c 100644
--- a/examples/sample.source.RRC/Makefile
+++ b/examples/sample.source.RRC/Makefile
@@ -4740,7 +4740,7 @@
# This file may be used as an input for make(3)
# Remove the lines below to convert it into a pure .am file
TARGET = rrc-dump
-CFLAGS += -DHAVE_CONFIG_H -DPDU=DL_DCCH_Message -DASN_PDU_COLLECTION -I.
+CFLAGS += -DHAVE_CONFIG_H -DJUNKTEST -DPDU=DL_DCCH_Message -DASN_PDU_COLLECTION -I.
OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o}
all: DL-DCCH-Message.c $(TARGET)
@@ -4776,7 +4776,12 @@
PROGNAME=rrc-dump \
../sample.makefile.regen
-check: ${TARGET}
+check: ${TARGET} check-ber check-xer check-per
+ @echo ================
+ @echo All tests passed
+ @echo ================
+
+check-ber:
@if test -f sample-DL-DCCH-Message-1.[db]er ; then \
for f in sample-DL-DCCH-Message-*.[db]er; do \
for b in 1 17 33 980 8192; do \
@@ -4785,7 +4790,12 @@
./${TARGET} -b $$b -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -iber -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -iber -onull $$f || exit 2; \
done; done; fi
+
+check-xer:
@if test -f sample-DL-DCCH-Message-1.xer ; then \
for f in sample-DL-DCCH-Message-*.xer; do \
for b in 1 17 33 980 8192; do \
@@ -4794,7 +4804,12 @@
./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff $$f ./.tmp.2.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \
done; done; fi
+
+check-per:
@if test -f sample-DL-DCCH-Message-1.per ; then \
for f in sample-DL-DCCH-Message-[1-9].per; do \
for b in 1 17 33 980 8192; do \
@@ -4804,6 +4819,9 @@
./${TARGET} -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \
rm -f ./.tmp.[123].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -iper -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -iper -onull $$f || exit 2; \
done; done; fi
@if test -f sample-DL-DCCH-Message-1-padded.per ; then \
for f in sample-*-[1-9]-padded.per; do \
@@ -4815,10 +4833,10 @@
./${TARGET} -b $$b -p $$pdu -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 2; \
diff $$f ./.tmp.1.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \
done; done; fi
- @echo ================
- @echo All tests passed
- @echo ================
distclean: clean
rm -f $(ASN_MODULE_SOURCES)
diff --git a/examples/sample.source.TAP3/Makefile b/examples/sample.source.TAP3/Makefile
index 143d562..b00a114 100644
--- a/examples/sample.source.TAP3/Makefile
+++ b/examples/sample.source.TAP3/Makefile
@@ -679,7 +679,7 @@
# This file may be used as an input for make(3)
# Remove the lines below to convert it into a pure .am file
TARGET = tap3dump
-CFLAGS += -DHAVE_CONFIG_H -DPDU=DataInterChange -I.
+CFLAGS += -DHAVE_CONFIG_H -DJUNKTEST -DPDU=DataInterChange -I.
OBJS=${ASN_MODULE_SOURCES:.c=.o} ${ASN_CONVERTER_SOURCES:.c=.o}
all: DataInterChange.c $(TARGET)
@@ -715,7 +715,12 @@
PROGNAME=tap3dump \
../sample.makefile.regen
-check: ${TARGET}
+check: ${TARGET} check-ber check-xer check-per
+ @echo ================
+ @echo All tests passed
+ @echo ================
+
+check-ber:
@if test -f sample-DataInterChange-1.[db]er ; then \
for f in sample-DataInterChange-*.[db]er; do \
for b in 1 17 33 980 8192; do \
@@ -724,7 +729,12 @@
./${TARGET} -b $$b -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -iber -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -iber -onull $$f || exit 2; \
done; done; fi
+
+check-xer:
@if test -f sample-DataInterChange-1.xer ; then \
for f in sample-DataInterChange-*.xer; do \
for b in 1 17 33 980 8192; do \
@@ -733,7 +743,12 @@
./${TARGET} -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 2; \
diff $$f ./.tmp.2.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -ixer -onull $$f || exit 2; \
done; done; fi
+
+check-per:
@if test -f sample-DataInterChange-1.per ; then \
for f in sample-DataInterChange-[1-9].per; do \
for b in 1 17 33 980 8192; do \
@@ -743,6 +758,9 @@
./${TARGET} -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 2; \
diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 2; \
rm -f ./.tmp.[123].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -iper -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -iper -onull $$f || exit 2; \
done; done; fi
@if test -f sample-DataInterChange-1-padded.per ; then \
for f in sample-*-[1-9]-padded.per; do \
@@ -754,10 +772,10 @@
./${TARGET} -b $$b -p $$pdu -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 2; \
diff $$f ./.tmp.1.$$$$ || exit 2; \
rm -f ./.tmp.[12].$$$$; \
+ echo "Test junking $$f (please wait)..."; \
+ ./${TARGET} -J0.0001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \
+ ./${TARGET} -J0.001 -n 1000 -b $$b -per-padded -iper -onull $$f || exit 2; \
done; done; fi
- @echo ================
- @echo All tests passed
- @echo ================
distclean: clean
rm -f $(ASN_MODULE_SOURCES)