Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lwc
/
compare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b9b46f04
authored
Jun 11, 2020
by
Enrico Pozzobon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get test vectors from internal directory instead of submission
parent
d1739748
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
compile_all.py
+9
-13
No files found.
compile_all.py
View file @
b9b46f04
...
@@ -54,6 +54,9 @@ def build(algo_dir, template_dir, build_dir):
...
@@ -54,6 +54,9 @@ def build(algo_dir, template_dir, build_dir):
env
[
'SRC_FILES'
]
=
' '
.
join
(
cfiles
)
env
[
'SRC_FILES'
]
=
' '
.
join
(
cfiles
)
env
[
'ASM_FILES'
]
=
' '
.
join
(
sfiles
)
env
[
'ASM_FILES'
]
=
' '
.
join
(
sfiles
)
env
[
'HDR_FILES'
]
=
' '
.
join
(
hfiles
)
env
[
'HDR_FILES'
]
=
' '
.
join
(
hfiles
)
print
(
"SRC_FILES is '
%
s'"
%
env
[
'SRC_FILES'
])
print
(
"ASM_FILES is '
%
s'"
%
env
[
'ASM_FILES'
])
print
(
"HDR_FILES is '
%
s'"
%
env
[
'HDR_FILES'
])
# enter the directory and execute the makefile
# enter the directory and execute the makefile
wd
=
os
.
getcwd
()
wd
=
os
.
getcwd
()
...
@@ -80,22 +83,15 @@ def build(algo_dir, template_dir, build_dir):
...
@@ -80,22 +83,15 @@ def build(algo_dir, template_dir, build_dir):
return
True
return
True
# Find test vectors in
directory or one of the parent directories
# Find test vectors in
the test_vectors directory
def
find_test_vectors
(
d
):
def
find_test_vectors
(
variant
):
kat
=
None
kat
=
None
while
True
:
test_vectors_dir
=
os
.
path
.
join
(
"test_vectors"
,
variant
)
if
d
==
''
:
for
f
in
os
.
listdir
(
test_vectors_dir
):
raise
Exception
(
"Test vector not found"
)
for
f
in
os
.
listdir
(
d
):
if
f
.
startswith
(
"LWC_AEAD_KAT_"
)
and
f
.
endswith
(
".txt"
):
if
f
.
startswith
(
"LWC_AEAD_KAT_"
)
and
f
.
endswith
(
".txt"
):
if
kat
is
not
None
:
if
kat
is
not
None
:
raise
Exception
(
"Multiple test vectors?"
)
raise
Exception
(
"Multiple test vectors?"
)
kat
=
f
kat
=
os
.
path
.
join
(
test_vectors_dir
,
f
)
if
kat
is
None
:
d
=
os
.
path
.
split
(
d
)[
0
]
else
:
break
kat
=
os
.
path
.
join
(
d
,
kat
)
return
kat
return
kat
...
@@ -173,7 +169,7 @@ def main(argv):
...
@@ -173,7 +169,7 @@ def main(argv):
print
(
d
)
print
(
d
)
# Test vectors file t
# Test vectors file t
t
=
find_test_vectors
(
d
)
t
=
find_test_vectors
(
variant
)
print
(
t
)
print
(
t
)
# if include_list was provided, skip elements not in the list
# if include_list was provided, skip elements not in the list
...
...
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