Commit 13f99d8a authored by Mouse's avatar Mouse

Merge remote-tracking branch 'velichkov/s1ap' into s1ap

parents 968bdd69 8d06d92d
......@@ -60,7 +60,7 @@ test -n "$TITLE" && EXTRA_CFLAGS="-DASN_CONVERTER_TITLE=\"$TITLE\" ${EXTRA_CFLAG
echo " ASN_PROGRAM=${ASN_PROGRAM} \\"
echo " $0"
echo
echo 'check: ${ASN_PROGRAM} check-ber check-xer check-oer check-per'
echo 'check: ${ASN_PROGRAM} check-ber check-xer check-oer check-per check-aper'
echo ' @echo ================'
echo ' @echo All tests passed'
echo ' @echo ================'
......@@ -140,6 +140,22 @@ test -n "$TITLE" && EXTRA_CFLAGS="-DASN_CONVERTER_TITLE=\"$TITLE\" ${EXTRA_CFLAG
echo ' ./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -iper -onull $$f || exit 8; \'
echo ' done; done; fi'
echo
echo 'check-aper:'
echo " @files=\$\$(find . -type f -regex '^.*\/sample-.*-[0-9]+.aper\$\$' | sort -V); \\"
echo ' if [ -n "$$files" ]; then \'
echo ' for f in $$files; do \'
echo ' pdu=`echo $$f | sed -E -e "s/.*sample-([A-Za-z0-9-]+)-[0-9]+.*/\\1/"`; \'
echo ' for b in 1 17 33 980 8192; do \'
echo ' echo "Recoding $$f ($$pdu) into XER and back ($$b)..."; \'
echo ' ./${ASN_PROGRAM} -p $$pdu -b $$b -iaper -oxer $$f > ./.tmp.1.$$$$ || exit 3; \'
echo ' ./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -oaper ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 4; \'
echo ' diff $$f ./.tmp.2.$$$$ || exit 6; \'
echo ' rm -f ./.tmp.[12].$$$$; \'
echo ' echo "Test junking $$f (please wait)..."; \'
echo ' ./${ASN_PROGRAM} -J0.0001 -n 1000 -p $$pdu -b $$b -iaper -onull $$f || exit 7; \'
echo ' ./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -iaper -onull $$f || exit 8; \'
echo ' done; done; fi'
echo
echo "maybe-wip-pause:"
echo " @if [ -f WIP ]; then cat WIP; sleep 2; fi"
echo
......
......@@ -10,13 +10,13 @@ S1AP-PDU.c: ../sample.makefile.regen ../s1ap-14.4.0.asn1
make
regen-makefile:
ASN_CMDOPTS="-pdu=all -fcompound-names -findirect-choice -fno-include-deps -gen-PER" \
ASN_CMDOPTS="-pdu=all -fcompound-names -findirect-choice -fno-include-deps -flink-skeletons -gen-PER" \
ASN_MODULES="../s1ap-14.4.0.asn1" \
ASN_PDU=S1AP-PDU \
ASN_PROGRAM=s1ap-dump \
../sample.makefile.regen
check: ${ASN_PROGRAM} check-ber check-xer check-oer check-per
check: ${ASN_PROGRAM} check-ber check-xer check-oer check-per check-aper
@echo ================
@echo All tests passed
@echo ================
......@@ -24,7 +24,7 @@ check: ${ASN_PROGRAM} check-ber check-xer check-oer check-per
check-ber:
@if test -f sample-S1AP-PDU-1.[db]er ; then \
for f in sample-*-*.[db]er; do \
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\\1/"`; \
for b in 1 17 33 980 8192; do \
echo "Recoding $$f ($$pdu) into XER and back ($$b)..."; \
./${ASN_PROGRAM} -p $$pdu -b $$b -iber -oxer $$f > ./.tmp.1.$$$$ || exit 2; \
......@@ -39,7 +39,7 @@ check-ber:
check-xer:
@if test -f sample-S1AP-PDU-1.xer ; then \
for f in sample-*-*.xer; do \
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\\1/"`; \
for b in 1 17 33 980 8192; do \
echo "Recoding $$f ($$pdu) into DER and back ($$b)..."; \
./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -oder $$f > ./.tmp.1.$$$$ || exit 2; \
......@@ -54,7 +54,7 @@ check-xer:
check-oer:
@if test -f sample-S1AP-PDU-1.*oer ; then \
for f in sample-*-*.*oer; do \
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\\1/"`; \
for b in 1 17 33 980 8192; do \
echo "Recoding $$f ($$pdu) into XER and back ($$b)..."; \
./${ASN_PROGRAM} -p $$pdu -b $$b -ioer -oxer $$f > ./.tmp.1.$$$$ || exit 2; \
......@@ -69,7 +69,7 @@ check-oer:
check-per:
@if test -f sample-S1AP-PDU-1-nopad.per ; then \
for f in sample-*-[1-9]-nopad.per; do \
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\\1/"`; \
for b in 1 17 33 980 8192; do \
echo "Recoding non-padded $$f ($$pdu) into DER into XER and back ($$b)..."; \
./${ASN_PROGRAM} -p $$pdu -b $$b -per-nopad -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
......@@ -83,7 +83,7 @@ check-per:
done; done; fi
@if test -f sample-S1AP-PDU-1.per ; then \
for f in sample-*-[1-9].per; do \
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\\1/"`; \
for b in 1 17 33 980 8192; do \
echo "Recoding $$f ($$pdu) into DER into XER and back ($$b)..."; \
./${ASN_PROGRAM} -p $$pdu -b $$b -iper -oder $$f > ./.tmp.1.$$$$ || exit 3; \
......@@ -96,6 +96,22 @@ check-per:
./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -iper -onull $$f || exit 8; \
done; done; fi
check-aper:
@files=$$(find . -type f -regex '^.*\/sample-.*-[0-9]+.aper$$' | sort -V); \
if [ -n "$$files" ]; then \
for f in $$files; do \
pdu=`echo $$f | sed -E -e "s/.*sample-([A-Za-z0-9-]+)-[0-9]+.*/\\1/"`; \
for b in 1 17 33 980 8192; do \
echo "Recoding $$f ($$pdu) into XER and back ($$b)..."; \
./${ASN_PROGRAM} -p $$pdu -b $$b -iaper -oxer $$f > ./.tmp.1.$$$$ || exit 3; \
./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -oaper ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 4; \
diff $$f ./.tmp.2.$$$$ || exit 6; \
rm -f ./.tmp.[12].$$$$; \
echo "Test junking $$f (please wait)..."; \
./${ASN_PROGRAM} -J0.0001 -n 1000 -p $$pdu -b $$b -iaper -onull $$f || exit 7; \
./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -iaper -onull $$f || exit 8; \
done; done; fi
maybe-wip-pause:
@if [ -f WIP ]; then cat WIP; sleep 2; fi
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment