Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LI - Lawful Interception
Trial
Commits
a76d7465
Commit
a76d7465
authored
Oct 02, 2020
by
canterburym
Browse files
Merge branch 'update_testing' into 'master'
Update testing See merge request
!21
parents
1b6cae88
e325dc36
Pipeline
#7371
passed with stage
in 22 seconds
Changes
2
Pipelines
3
Show whitespace changes
Inline
Side-by-side
testing/check_asn1.py
View file @
a76d7465
...
...
@@ -3,6 +3,8 @@ from compile_asn import *
if
__name__
==
'__main__'
:
log
=
logging
.
getLogger
()
log
.
setLevel
(
logging
.
INFO
)
parseErrors
,
compileErrors
,
parser
=
validateAllASN1FilesInPath
(
"./"
)
parseErrorCount
=
0
print
(
"ASN.1 Parser checks:"
)
...
...
testing/compile_asn.py
View file @
a76d7465
...
...
@@ -114,17 +114,21 @@ def compileASN1Files (fileList):
except
CompileError
as
ex
:
logging
.
info
(
f
"Compiler error:
{
ex
}
"
)
errors
.
append
(
ex
)
return
errors
,
None
except
ParseError
as
ex
:
logging
.
info
(
f
"Parse error:
{
ex
}
"
)
errors
.
append
(
ex
)
return
errors
,
None
logging
.
info
(
"Compiled OK"
)
return
errors
,
c
def
validateASN1Files
(
fileList
):
parseErrors
=
parseASN1Files
(
fileList
)
if
len
(
parseErrors
)
>
0
:
logging
.
info
(
"Abandonding compile due to parse errors"
)
errorCount
=
sum
([
len
(
v
)
for
k
,
v
in
parseErrors
.
items
()])
if
errorCount
>
0
:
logging
.
info
(
"Abandoning compile due to parse errors"
)
return
parseErrors
,
[],
None
compileErrors
,
parser
=
compileASN1Files
(
fileList
)
return
parseErrors
,
compileErrors
,
parser
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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