Commit c3ec46da by Enrico Pozzobon

compile all has now an argument for choosing which tests to perform

parent 04c5f18d
......@@ -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 = []
subfiles = []
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'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment