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):
env
[
'SRC_FILES'
]
=
' '
.
join
(
cfiles
)
env
[
'ASM_FILES'
]
=
' '
.
join
(
sfiles
)
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
wd
=
os
.
getcwd
()
...
...
@@ -80,22 +83,15 @@ def build(algo_dir, template_dir, build_dir):
return
True
# Find test vectors in
directory or one of the parent directories
def
find_test_vectors
(
d
):
# Find test vectors in
the test_vectors directory
def
find_test_vectors
(
variant
):
kat
=
None
while
True
:
if
d
==
''
:
raise
Exception
(
"Test vector not found"
)
for
f
in
os
.
listdir
(
d
):
test_vectors_dir
=
os
.
path
.
join
(
"test_vectors"
,
variant
)
for
f
in
os
.
listdir
(
test_vectors_dir
):
if
f
.
startswith
(
"LWC_AEAD_KAT_"
)
and
f
.
endswith
(
".txt"
):
if
kat
is
not
None
:
raise
Exception
(
"Multiple test vectors?"
)
kat
=
f
if
kat
is
None
:
d
=
os
.
path
.
split
(
d
)[
0
]
else
:
break
kat
=
os
.
path
.
join
(
d
,
kat
)
kat
=
os
.
path
.
join
(
test_vectors_dir
,
f
)
return
kat
...
...
@@ -173,7 +169,7 @@ def main(argv):
print
(
d
)
# Test vectors file t
t
=
find_test_vectors
(
d
)
t
=
find_test_vectors
(
variant
)
print
(
t
)
# 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