Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
27a1f7ef
Commit
27a1f7ef
authored
Mar 03, 2018
by
Vasil Velichkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `check-aper` target in the sample.makefile.regen
and regenerate the the S1AP Makefile
parent
ca9847dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
7 deletions
+39
-7
examples/sample.makefile.regen
examples/sample.makefile.regen
+17
-1
examples/sample.source.S1AP/Makefile
examples/sample.source.S1AP/Makefile
+22
-6
No files found.
examples/sample.makefile.regen
View file @
27a1f7ef
...
...
@@ -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
...
...
examples/sample.source.S1AP/Makefile
View file @
27a1f7ef
...
...
@@ -16,7 +16,7 @@ regen-makefile:
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment