2017-10-10 07:29:18 +00:00
|
|
|
ASN_PROGRAM = rrc-dump
|
|
|
|
CFLAGS += -DHAVE_CONFIG_H -DJUNKTEST -D_DEFAULT_SOURCE
|
|
|
|
begin: DL-DCCH-Message.c maybe-wip-pause all
|
2006-09-17 03:27:57 +00:00
|
|
|
|
2017-10-10 07:29:18 +00:00
|
|
|
-include Makefile.am.example
|
2006-09-17 03:27:57 +00:00
|
|
|
|
2013-04-07 08:37:43 +00:00
|
|
|
DL-DCCH-Message.c: ../sample.makefile.regen ../rrc-7.1.0.asn1
|
2006-09-17 04:01:29 +00:00
|
|
|
make regen-makefile
|
|
|
|
@touch DL-DCCH-Message.c
|
|
|
|
make
|
|
|
|
|
|
|
|
regen-makefile:
|
2017-10-09 05:36:29 +00:00
|
|
|
ASN_CMDOPTS="-pdu=auto -fcompound-names -gen-PER" \
|
|
|
|
ASN_MODULES="../rrc-7.1.0.asn1" \
|
|
|
|
ASN_PDU=DL-DCCH-Message \
|
|
|
|
ASN_PROGRAM=rrc-dump \
|
2006-09-17 03:27:57 +00:00
|
|
|
../sample.makefile.regen
|
|
|
|
|
2017-10-10 07:29:18 +00:00
|
|
|
check: ${ASN_PROGRAM} check-ber check-xer check-oer check-per
|
2006-09-24 19:47:07 +00:00
|
|
|
@echo ================
|
|
|
|
@echo All tests passed
|
|
|
|
@echo ================
|
|
|
|
|
|
|
|
check-ber:
|
2006-09-18 21:19:32 +00:00
|
|
|
@if test -f sample-DL-DCCH-Message-1.[db]er ; then \
|
2017-08-27 19:54:25 +00:00
|
|
|
for f in sample-*-*.[db]er; do \
|
2017-09-13 06:29:20 +00:00
|
|
|
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \
|
2006-09-18 21:30:04 +00:00
|
|
|
for b in 1 17 33 980 8192; do \
|
2017-08-27 19:54:25 +00:00
|
|
|
echo "Recoding $$f ($$pdu) into XER and back ($$b)..."; \
|
2017-10-10 07:29:18 +00:00
|
|
|
./${ASN_PROGRAM} -p $$pdu -b $$b -iber -oxer $$f > ./.tmp.1.$$$$ || exit 2; \
|
|
|
|
./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \
|
2007-06-26 08:24:50 +00:00
|
|
|
diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 4; \
|
2006-09-17 11:02:53 +00:00
|
|
|
rm -f ./.tmp.[12].$$$$; \
|
2006-09-24 19:47:07 +00:00
|
|
|
echo "Test junking $$f (please wait)..."; \
|
2017-10-10 07:29:18 +00:00
|
|
|
./${ASN_PROGRAM} -J0.0001 -n 1000 -p $$pdu -b $$b -iber -onull $$f || exit 5; \
|
|
|
|
./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -iber -onull $$f || exit 6; \
|
2006-09-18 21:30:04 +00:00
|
|
|
done; done; fi
|
2006-09-24 19:47:07 +00:00
|
|
|
|
|
|
|
check-xer:
|
2006-09-18 21:19:32 +00:00
|
|
|
@if test -f sample-DL-DCCH-Message-1.xer ; then \
|
2017-08-27 19:54:25 +00:00
|
|
|
for f in sample-*-*.xer; do \
|
2017-09-13 06:29:20 +00:00
|
|
|
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \
|
2006-09-18 21:30:04 +00:00
|
|
|
for b in 1 17 33 980 8192; do \
|
2017-08-27 19:54:25 +00:00
|
|
|
echo "Recoding $$f ($$pdu) into DER and back ($$b)..."; \
|
2017-10-10 07:29:18 +00:00
|
|
|
./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -oder $$f > ./.tmp.1.$$$$ || exit 2; \
|
|
|
|
./${ASN_PROGRAM} -p $$pdu -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \
|
2007-06-26 08:24:50 +00:00
|
|
|
diff $$f ./.tmp.2.$$$$ || exit 4; \
|
2006-09-17 11:02:53 +00:00
|
|
|
rm -f ./.tmp.[12].$$$$; \
|
2006-09-24 19:47:07 +00:00
|
|
|
echo "Test junking $$f (please wait)..."; \
|
2017-10-10 07:29:18 +00:00
|
|
|
./${ASN_PROGRAM} -J0.0001 -n 1000 -p $$pdu -b $$b -ixer -onull $$f || exit 5; \
|
|
|
|
./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -ixer -onull $$f || exit 6; \
|
2006-09-18 21:30:04 +00:00
|
|
|
done; done; fi
|
2006-09-24 19:47:07 +00:00
|
|
|
|
2017-09-13 06:29:20 +00:00
|
|
|
check-oer:
|
|
|
|
@if test -f sample-DL-DCCH-Message-1.*oer ; then \
|
|
|
|
for f in sample-*-*.*oer; do \
|
|
|
|
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \
|
2006-09-18 21:30:04 +00:00
|
|
|
for b in 1 17 33 980 8192; do \
|
2017-09-13 06:29:20 +00:00
|
|
|
echo "Recoding $$f ($$pdu) into XER and back ($$b)..."; \
|
2017-10-10 07:29:18 +00:00
|
|
|
./${ASN_PROGRAM} -p $$pdu -b $$b -ioer -oxer $$f > ./.tmp.1.$$$$ || exit 2; \
|
|
|
|
./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -ooer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \
|
2017-09-13 06:29:20 +00:00
|
|
|
diff $$f ./.tmp.2.$$$$ || exit 4; \
|
|
|
|
rm -f ./.tmp.[12].$$$$; \
|
|
|
|
echo "Test junking $$f (please wait) ($$b) ..."; \
|
2017-10-10 07:29:18 +00:00
|
|
|
./${ASN_PROGRAM} -J0.0001 -n 1000 -p $$pdu -b $$b -ioer -onull $$f || exit 5; \
|
|
|
|
./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -ioer -onull $$f || exit 6; \
|
2006-09-18 21:30:04 +00:00
|
|
|
done; done; fi
|
2017-09-13 06:29:20 +00:00
|
|
|
|
|
|
|
check-per:
|
2017-09-13 07:57:59 +00:00
|
|
|
@if test -f sample-DL-DCCH-Message-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/"`; \
|
|
|
|
for b in 1 17 33 980 8192; do \
|
|
|
|
echo "Recoding non-padded $$f ($$pdu) into DER into XER and back ($$b)..."; \
|
2017-10-10 07:29:18 +00:00
|
|
|
./${ASN_PROGRAM} -p $$pdu -b $$b -per-nopad -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \
|
|
|
|
./${ASN_PROGRAM} -p $$pdu -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \
|
|
|
|
./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 4; \
|
2017-09-13 07:57:59 +00:00
|
|
|
diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 5; \
|
|
|
|
rm -f ./.tmp.[123].$$$$; \
|
|
|
|
echo "Test junking $$f (please wait)..."; \
|
2017-10-10 07:29:18 +00:00
|
|
|
./${ASN_PROGRAM} -J0.0001 -n 1000 -p $$pdu -b $$b -per-nopad -iper -onull $$f || exit 6; \
|
|
|
|
./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -per-nopad -iper -onull $$f || exit 7; \
|
2017-09-13 07:57:59 +00:00
|
|
|
done; done; fi
|
2007-06-26 08:24:50 +00:00
|
|
|
@if test -f sample-DL-DCCH-Message-1.per ; then \
|
|
|
|
for f in sample-*-[1-9].per; do \
|
2017-09-13 06:29:20 +00:00
|
|
|
pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \
|
2006-09-18 21:30:04 +00:00
|
|
|
for b in 1 17 33 980 8192; do \
|
2017-08-27 19:54:25 +00:00
|
|
|
echo "Recoding $$f ($$pdu) into DER into XER and back ($$b)..."; \
|
2017-10-10 07:29:18 +00:00
|
|
|
./${ASN_PROGRAM} -p $$pdu -b $$b -iper -oder $$f > ./.tmp.1.$$$$ || exit 3; \
|
|
|
|
./${ASN_PROGRAM} -p $$pdu -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 4; \
|
|
|
|
./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 5; \
|
2007-06-26 08:24:50 +00:00
|
|
|
diff $$f ./.tmp.1.$$$$ || exit 6; \
|
2006-09-18 21:30:04 +00:00
|
|
|
rm -f ./.tmp.[12].$$$$; \
|
2006-09-24 19:47:07 +00:00
|
|
|
echo "Test junking $$f (please wait)..."; \
|
2017-10-10 07:29:18 +00:00
|
|
|
./${ASN_PROGRAM} -J0.0001 -n 1000 -p $$pdu -b $$b -iper -onull $$f || exit 7; \
|
|
|
|
./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -iper -onull $$f || exit 8; \
|
2006-09-18 21:30:04 +00:00
|
|
|
done; done; fi
|
2006-09-17 03:27:57 +00:00
|
|
|
|
2017-08-25 19:55:10 +00:00
|
|
|
maybe-wip-pause:
|
|
|
|
@if [ -f WIP ]; then cat WIP; sleep 2; fi
|
|
|
|
|
2006-09-17 03:27:57 +00:00
|
|
|
distclean: clean
|
|
|
|
rm -f $(ASN_MODULE_SOURCES)
|
|
|
|
rm -f $(ASN_MODULE_HEADERS)
|
2017-10-10 07:29:18 +00:00
|
|
|
rm -f $(ASN_PROGRAM_SOURCES) $(ASN_PROGRAM_HEADERS)
|
2017-09-27 05:55:22 +00:00
|
|
|
rm -f Makefile.am.example
|