aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2006-09-24 19:47:07 +0000
committerLev Walkin <vlm@lionet.info>2006-09-24 19:47:07 +0000
commit1f12da4718415b094074da4a864eb59a594000b6 (patch)
tree29a00ece93ab6d1eade6f459530019e9d11228e1 /examples
parentd7f5cb9eccd712884696540e3e03a9f2704e1ef4 (diff)
junktesting support
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/sample.makefile.regen30
-rw-r--r--examples/sample.source.LDAP3/Makefile28
-rw-r--r--examples/sample.source.MEGACO/Makefile28
-rw-r--r--examples/sample.source.MHEG5/Makefile28
-rw-r--r--examples/sample.source.PKIX1/Makefile28
-rw-r--r--examples/sample.source.RRC/Makefile28
-rw-r--r--examples/sample.source.TAP3/Makefile28
7 files changed, 162 insertions, 36 deletions
diff --git a/examples/sample.makefile.regen b/examples/sample.makefile.regen
index a382423a..b1f4a646 100755
--- a/examples/sample.makefile.regen
+++ b/examples/sample.makefile.regen
@@ -38,9 +38,9 @@ if test ! -f Makefile.am.sample ; then
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 @@ set +x
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 @@ set +x
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 @@ set +x
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 @@ set +x
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 @@ set +x
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 27810c03..ed190fc8 100644
--- a/examples/sample.source.LDAP3/Makefile
+++ b/examples/sample.source.LDAP3/Makefile
@@ -163,7 +163,7 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
# 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 @@ regen-makefile:
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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 3490054c..2087e670 100644
--- a/examples/sample.source.MEGACO/Makefile
+++ b/examples/sample.source.MEGACO/Makefile
@@ -285,7 +285,7 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
# 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 @@ regen-makefile:
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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 7617a6e4..d34374fe 100644
--- a/examples/sample.source.MHEG5/Makefile
+++ b/examples/sample.source.MHEG5/Makefile
@@ -453,7 +453,7 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
# 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 @@ regen-makefile:
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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 be469491..1a79ca7f 100644
--- a/examples/sample.source.PKIX1/Makefile
+++ b/examples/sample.source.PKIX1/Makefile
@@ -345,7 +345,7 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
# 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 @@ regen-makefile:
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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 5c6234f9..bd8251cb 100644
--- a/examples/sample.source.RRC/Makefile
+++ b/examples/sample.source.RRC/Makefile
@@ -4740,7 +4740,7 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
# 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 @@ regen-makefile:
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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 143d562f..b00a114c 100644
--- a/examples/sample.source.TAP3/Makefile
+++ b/examples/sample.source.TAP3/Makefile
@@ -679,7 +679,7 @@ libsomething_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS)
# 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 @@ regen-makefile:
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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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 @@ check: ${TARGET}
./${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)