Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 1 | ASN_PROGRAM = rrc-dump |
| 2 | CFLAGS += -DHAVE_CONFIG_H -DJUNKTEST -D_DEFAULT_SOURCE |
| 3 | begin: DL-DCCH-Message.c maybe-wip-pause all |
Lev Walkin | 48f3365 | 2006-09-17 03:27:57 +0000 | [diff] [blame] | 4 | |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 5 | -include Makefile.am.example |
Lev Walkin | 48f3365 | 2006-09-17 03:27:57 +0000 | [diff] [blame] | 6 | |
Lev Walkin | 101c26d | 2013-04-07 01:37:43 -0700 | [diff] [blame] | 7 | DL-DCCH-Message.c: ../sample.makefile.regen ../rrc-7.1.0.asn1 |
Lev Walkin | cc7c94e | 2006-09-17 04:01:29 +0000 | [diff] [blame] | 8 | make regen-makefile |
| 9 | @touch DL-DCCH-Message.c |
Lev Walkin | 48f3365 | 2006-09-17 03:27:57 +0000 | [diff] [blame] | 10 | make |
| 11 | |
Lev Walkin | cc7c94e | 2006-09-17 04:01:29 +0000 | [diff] [blame] | 12 | regen-makefile: |
Lev Walkin | 40b8a7a | 2017-10-08 22:36:29 -0700 | [diff] [blame] | 13 | ASN_CMDOPTS="-pdu=auto -fcompound-names -gen-PER" \ |
| 14 | ASN_MODULES="../rrc-7.1.0.asn1" \ |
| 15 | ASN_PDU=DL-DCCH-Message \ |
| 16 | ASN_PROGRAM=rrc-dump \ |
Lev Walkin | cc7c94e | 2006-09-17 04:01:29 +0000 | [diff] [blame] | 17 | ../sample.makefile.regen |
| 18 | |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 19 | check: ${ASN_PROGRAM} check-ber check-xer check-oer check-per |
Lev Walkin | 1f12da4 | 2006-09-24 19:47:07 +0000 | [diff] [blame] | 20 | @echo ================ |
| 21 | @echo All tests passed |
| 22 | @echo ================ |
| 23 | |
| 24 | check-ber: |
Lev Walkin | 0091881 | 2006-09-18 21:19:32 +0000 | [diff] [blame] | 25 | @if test -f sample-DL-DCCH-Message-1.[db]er ; then \ |
Lev Walkin | a926fce | 2017-08-27 12:54:25 -0700 | [diff] [blame] | 26 | for f in sample-*-*.[db]er; do \ |
Lev Walkin | 9dc9f67 | 2017-09-12 23:29:20 -0700 | [diff] [blame] | 27 | pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \ |
Lev Walkin | 13afe53 | 2006-09-18 21:30:04 +0000 | [diff] [blame] | 28 | for b in 1 17 33 980 8192; do \ |
Lev Walkin | a926fce | 2017-08-27 12:54:25 -0700 | [diff] [blame] | 29 | echo "Recoding $$f ($$pdu) into XER and back ($$b)..."; \ |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 30 | ./${ASN_PROGRAM} -p $$pdu -b $$b -iber -oxer $$f > ./.tmp.1.$$$$ || exit 2; \ |
| 31 | ./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \ |
Lev Walkin | 08b30bb | 2007-06-26 08:24:50 +0000 | [diff] [blame] | 32 | diff ./.tmp.1.$$$$ ./.tmp.2.$$$$ || exit 4; \ |
Lev Walkin | bc69177 | 2006-09-17 11:02:53 +0000 | [diff] [blame] | 33 | rm -f ./.tmp.[12].$$$$; \ |
Lev Walkin | 1f12da4 | 2006-09-24 19:47:07 +0000 | [diff] [blame] | 34 | echo "Test junking $$f (please wait)..."; \ |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 35 | ./${ASN_PROGRAM} -J0.0001 -n 1000 -p $$pdu -b $$b -iber -onull $$f || exit 5; \ |
| 36 | ./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -iber -onull $$f || exit 6; \ |
Lev Walkin | 13afe53 | 2006-09-18 21:30:04 +0000 | [diff] [blame] | 37 | done; done; fi |
Lev Walkin | 1f12da4 | 2006-09-24 19:47:07 +0000 | [diff] [blame] | 38 | |
| 39 | check-xer: |
Lev Walkin | 0091881 | 2006-09-18 21:19:32 +0000 | [diff] [blame] | 40 | @if test -f sample-DL-DCCH-Message-1.xer ; then \ |
Lev Walkin | a926fce | 2017-08-27 12:54:25 -0700 | [diff] [blame] | 41 | for f in sample-*-*.xer; do \ |
Lev Walkin | 9dc9f67 | 2017-09-12 23:29:20 -0700 | [diff] [blame] | 42 | pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \ |
Lev Walkin | 13afe53 | 2006-09-18 21:30:04 +0000 | [diff] [blame] | 43 | for b in 1 17 33 980 8192; do \ |
Lev Walkin | a926fce | 2017-08-27 12:54:25 -0700 | [diff] [blame] | 44 | echo "Recoding $$f ($$pdu) into DER and back ($$b)..."; \ |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 45 | ./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -oder $$f > ./.tmp.1.$$$$ || exit 2; \ |
| 46 | ./${ASN_PROGRAM} -p $$pdu -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \ |
Lev Walkin | 08b30bb | 2007-06-26 08:24:50 +0000 | [diff] [blame] | 47 | diff $$f ./.tmp.2.$$$$ || exit 4; \ |
Lev Walkin | bc69177 | 2006-09-17 11:02:53 +0000 | [diff] [blame] | 48 | rm -f ./.tmp.[12].$$$$; \ |
Lev Walkin | 1f12da4 | 2006-09-24 19:47:07 +0000 | [diff] [blame] | 49 | echo "Test junking $$f (please wait)..."; \ |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 50 | ./${ASN_PROGRAM} -J0.0001 -n 1000 -p $$pdu -b $$b -ixer -onull $$f || exit 5; \ |
| 51 | ./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -ixer -onull $$f || exit 6; \ |
Lev Walkin | 13afe53 | 2006-09-18 21:30:04 +0000 | [diff] [blame] | 52 | done; done; fi |
Lev Walkin | 1f12da4 | 2006-09-24 19:47:07 +0000 | [diff] [blame] | 53 | |
Lev Walkin | 9dc9f67 | 2017-09-12 23:29:20 -0700 | [diff] [blame] | 54 | check-oer: |
| 55 | @if test -f sample-DL-DCCH-Message-1.*oer ; then \ |
| 56 | for f in sample-*-*.*oer; do \ |
| 57 | pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \ |
Lev Walkin | 13afe53 | 2006-09-18 21:30:04 +0000 | [diff] [blame] | 58 | for b in 1 17 33 980 8192; do \ |
Lev Walkin | 9dc9f67 | 2017-09-12 23:29:20 -0700 | [diff] [blame] | 59 | echo "Recoding $$f ($$pdu) into XER and back ($$b)..."; \ |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 60 | ./${ASN_PROGRAM} -p $$pdu -b $$b -ioer -oxer $$f > ./.tmp.1.$$$$ || exit 2; \ |
| 61 | ./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -ooer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \ |
Lev Walkin | 9dc9f67 | 2017-09-12 23:29:20 -0700 | [diff] [blame] | 62 | diff $$f ./.tmp.2.$$$$ || exit 4; \ |
| 63 | rm -f ./.tmp.[12].$$$$; \ |
| 64 | echo "Test junking $$f (please wait) ($$b) ..."; \ |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 65 | ./${ASN_PROGRAM} -J0.0001 -n 1000 -p $$pdu -b $$b -ioer -onull $$f || exit 5; \ |
| 66 | ./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -ioer -onull $$f || exit 6; \ |
Lev Walkin | 13afe53 | 2006-09-18 21:30:04 +0000 | [diff] [blame] | 67 | done; done; fi |
Lev Walkin | 9dc9f67 | 2017-09-12 23:29:20 -0700 | [diff] [blame] | 68 | |
| 69 | check-per: |
Lev Walkin | 2f18608 | 2017-09-13 00:57:59 -0700 | [diff] [blame] | 70 | @if test -f sample-DL-DCCH-Message-1-nopad.per ; then \ |
| 71 | for f in sample-*-[1-9]-nopad.per; do \ |
| 72 | pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \ |
| 73 | for b in 1 17 33 980 8192; do \ |
| 74 | echo "Recoding non-padded $$f ($$pdu) into DER into XER and back ($$b)..."; \ |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 75 | ./${ASN_PROGRAM} -p $$pdu -b $$b -per-nopad -iper -oder $$f > ./.tmp.1.$$$$ || exit 2; \ |
| 76 | ./${ASN_PROGRAM} -p $$pdu -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 3; \ |
| 77 | ./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -oder ./.tmp.2.$$$$ > ./.tmp.3.$$$$ || exit 4; \ |
Lev Walkin | 2f18608 | 2017-09-13 00:57:59 -0700 | [diff] [blame] | 78 | diff ./.tmp.1.$$$$ ./.tmp.3.$$$$ || exit 5; \ |
| 79 | rm -f ./.tmp.[123].$$$$; \ |
| 80 | echo "Test junking $$f (please wait)..."; \ |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 81 | ./${ASN_PROGRAM} -J0.0001 -n 1000 -p $$pdu -b $$b -per-nopad -iper -onull $$f || exit 6; \ |
| 82 | ./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -per-nopad -iper -onull $$f || exit 7; \ |
Lev Walkin | 2f18608 | 2017-09-13 00:57:59 -0700 | [diff] [blame] | 83 | done; done; fi |
Lev Walkin | 08b30bb | 2007-06-26 08:24:50 +0000 | [diff] [blame] | 84 | @if test -f sample-DL-DCCH-Message-1.per ; then \ |
| 85 | for f in sample-*-[1-9].per; do \ |
Lev Walkin | 9dc9f67 | 2017-09-12 23:29:20 -0700 | [diff] [blame] | 86 | pdu=`echo $$f | sed -E -e "s/sample-([A-Za-z0-9-]+)-[0-9].*/\1/"`; \ |
Lev Walkin | 13afe53 | 2006-09-18 21:30:04 +0000 | [diff] [blame] | 87 | for b in 1 17 33 980 8192; do \ |
Lev Walkin | a926fce | 2017-08-27 12:54:25 -0700 | [diff] [blame] | 88 | echo "Recoding $$f ($$pdu) into DER into XER and back ($$b)..."; \ |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 89 | ./${ASN_PROGRAM} -p $$pdu -b $$b -iper -oder $$f > ./.tmp.1.$$$$ || exit 3; \ |
| 90 | ./${ASN_PROGRAM} -p $$pdu -b $$b -iber -oxer ./.tmp.1.$$$$ > ./.tmp.2.$$$$ || exit 4; \ |
| 91 | ./${ASN_PROGRAM} -p $$pdu -b $$b -ixer -oper ./.tmp.2.$$$$ > ./.tmp.1.$$$$ || exit 5; \ |
Lev Walkin | 08b30bb | 2007-06-26 08:24:50 +0000 | [diff] [blame] | 92 | diff $$f ./.tmp.1.$$$$ || exit 6; \ |
Lev Walkin | 13afe53 | 2006-09-18 21:30:04 +0000 | [diff] [blame] | 93 | rm -f ./.tmp.[12].$$$$; \ |
Lev Walkin | 1f12da4 | 2006-09-24 19:47:07 +0000 | [diff] [blame] | 94 | echo "Test junking $$f (please wait)..."; \ |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 95 | ./${ASN_PROGRAM} -J0.0001 -n 1000 -p $$pdu -b $$b -iper -onull $$f || exit 7; \ |
| 96 | ./${ASN_PROGRAM} -J0.001 -n 1000 -p $$pdu -b $$b -iper -onull $$f || exit 8; \ |
Lev Walkin | 13afe53 | 2006-09-18 21:30:04 +0000 | [diff] [blame] | 97 | done; done; fi |
Lev Walkin | 48f3365 | 2006-09-17 03:27:57 +0000 | [diff] [blame] | 98 | |
Lev Walkin | eb00dfa | 2017-08-25 12:55:10 -0700 | [diff] [blame] | 99 | maybe-wip-pause: |
| 100 | @if [ -f WIP ]; then cat WIP; sleep 2; fi |
| 101 | |
Lev Walkin | 48f3365 | 2006-09-17 03:27:57 +0000 | [diff] [blame] | 102 | distclean: clean |
| 103 | rm -f $(ASN_MODULE_SOURCES) |
| 104 | rm -f $(ASN_MODULE_HEADERS) |
Lev Walkin | 294aebc | 2017-10-10 00:29:18 -0700 | [diff] [blame^] | 105 | rm -f $(ASN_PROGRAM_SOURCES) $(ASN_PROGRAM_HEADERS) |
Lev Walkin | ad77591 | 2017-09-26 22:55:22 -0700 | [diff] [blame] | 106 | rm -f Makefile.am.example |