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
c3ec46da
authored
Jul 23, 2019
by
Enrico Pozzobon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compile all has now an argument for choosing which tests to perform
parent
04c5f18d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
7 deletions
+26
-7
compile_all.py
+26
-7
No files found.
compile_all.py
View file @
c3ec46da
...
...
@@ -95,13 +95,19 @@ def find_test_vectors(d):
def
main
(
argv
):
submissions_dir
=
"all-lwc-submission-files"
template_dir
=
"templates/linux"
include_list
=
None
if
len
(
argv
)
>
1
:
template_dir
=
argv
[
1
]
if
len
(
argv
)
>
2
:
with
open
(
argv
[
2
],
'r'
)
as
includes
:
include_list
=
[]
for
line
in
includes
.
readlines
():
include_list
.
append
(
line
.
strip
())
print
(
"Using template
%
s"
%
template_dir
)
subs
=
os
.
listdir
(
submissions_dir
)
# get all the submissions by looking for files named "api.h"
files
=
[]
sub
files
=
[]
for
submission
in
subs
:
implementations_dir
=
os
.
path
.
join
(
submissions_dir
,
submission
,
"Implementations"
,
"crypto_aead"
)
...
...
@@ -120,6 +126,17 @@ def main(argv):
for
file
in
f
:
if
file
==
"api.h"
:
f
=
os
.
path
.
join
(
r
,
file
)
subfiles
.
append
(
f
)
c
+=
1
if
c
==
0
:
raise
Exception
(
"No implementations found"
)
if
include_list
is
not
None
:
print
(
"Include list has
%
d entries"
%
len
(
include_list
))
files
=
[]
for
f
in
subfiles
:
# Source directory d
d
=
os
.
path
.
split
(
f
)[
0
]
...
...
@@ -131,21 +148,23 @@ def main(argv):
print
(
t
)
# base name n
pieces
=
r
.
split
(
os
.
sep
)
n
=
submission
+
"."
+
"."
.
join
(
pieces
[
4
:
])
pieces
=
f
.
split
(
os
.
sep
)
n
=
pieces
[
1
]
+
"."
+
"."
.
join
(
pieces
[
4
:
-
1
])
print
(
n
)
# if include_list was provided, skip elements not in the list
if
include_list
is
not
None
:
if
not
n
in
include_list
:
continue
# Put all in a tuple and count
files
.
append
((
t
,
d
,
n
))
c
+=
1
if
c
==
0
:
raise
Exception
(
"No implementations found"
)
# For testing, we only do the first 1
#files = files[:1]
print
(
"
%
d algorithms will be compiled"
%
len
(
files
))
# Clear the build directory as it is a leftover from the previous execution
if
os
.
path
.
isdir
(
'build'
):
...
...
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