aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2017-08-27 17:59:09 -0700
committerLev Walkin <vlm@lionet.info>2017-08-27 17:59:09 -0700
commit090262fd4221837c410155e66afd0288c6a080e7 (patch)
tree85b6bcd90153b84b161bc475fad3e30c3a541ede
parenta926fce4ce910ba0521a2d5b08d367236f3b320c (diff)
add oer check
-rwxr-xr-xexamples/sample.makefile.regen17
1 files changed, 16 insertions, 1 deletions
diff --git a/examples/sample.makefile.regen b/examples/sample.makefile.regen
index dda437c9..6a4b81f1 100755
--- a/examples/sample.makefile.regen
+++ b/examples/sample.makefile.regen
@@ -65,7 +65,7 @@ set +x
echo " CPPFLAGS=\"${CPPFLAGS}\" \\"
echo " $0"
echo
- echo 'check: ${TARGET} check-ber check-xer check-per'
+ echo 'check: ${TARGET} check-ber check-xer check-oer check-per'
echo ' @echo ================'
echo ' @echo All tests passed'
echo ' @echo ================'
@@ -100,6 +100,21 @@ set +x
echo ' ./${TARGET} -J0.001 -n 1000 -p $$pdu -b $$b -ixer -onull $$f || exit 6; \'
echo ' done; done; fi'
echo
+ echo 'check-oer:'
+ echo " @if test -f sample-${ASN1PDU}-1.*oer ; then \\"
+ echo " for f in sample-*-*.{c,}oer; do \\"
+ echo ' pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z-]+)-[0-9].*/\\1/"`; \'
+ echo ' for b in 1 17 33 980 8192; do \'
+ echo ' echo "Recoding $$f ($$pdu) into XER and back ($$b)..."; \'
+ echo ' ./${TARGET} -p $$pdu -b $$b -ioer -oxer $$f > ./.tmp.1.$$$$ || exit 2; \'
+ echo ' ./${TARGET} -p $$pdu -b $$b -ioer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \'
+ echo ' diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 4; \'
+ echo ' rm -f ./.tmp.[12].$$$$; \'
+ echo ' echo "Test junking $$f (please wait)..."; \'
+ echo ' ./${TARGET} -J0.0001 -n 1000 -p $$pdu -b $$b -ioer -onull $$f || exit 5; \'
+ echo ' ./${TARGET} -J0.001 -n 1000 -p $$pdu -b $$b -ioer -onull $$f || exit 6; \'
+ echo ' done; done; fi'
+ echo
echo 'check-per:'
echo " @if test -f sample-${ASN1PDU}-1-nopad.per ; then \\"
echo " for f in sample-*-[1-9]-nopad.per; do \\"