Commit 343d0c39 by Enrico Pozzobon

improved exclusion of test vector generator

parent ca93b58a
...@@ -18,9 +18,12 @@ def build(algo_dir, template_dir, build_dir): ...@@ -18,9 +18,12 @@ def build(algo_dir, template_dir, build_dir):
shutil.copytree(algo_dir, build_dir) shutil.copytree(algo_dir, build_dir)
# remove the test vectors generator if it is there # remove the test vectors generator if it is there
c = os.path.join(build_dir, "genkat_aead.c") for r, d, f in os.walk(build_dir):
if os.path.exists(c): for file in f:
os.remove(c) with open(os.path.join(r, file), 'r') as o:
is_generator = 'generate_test_vectors' in o.read()
if is_generator:
os.remove(os.path.join(r, file))
# find all c and h files, since they will be added to the makefile # find all c and h files, since they will be added to the makefile
hfiles = [] hfiles = []
......
#!/bin/bash #!/bin/bash
mv -n *.dat *.inc *.h Inc/ mv -n *.dat *.inc *.h Inc/
sed -i src/encrypt.c -e "s/\(\s\)init(/\1_init(/g" [ -f ./build ] && rm ./build
[ -f src/encrypt.c ] && sed -i src/encrypt.c -e "s/\(\s\)init(/\1_init(/g"
mkdir -p /tmp/f7/Drivers mkdir -p /tmp/f7/Drivers
ln -s /tmp/f7/Drivers Drivers ln -s /tmp/f7/Drivers Drivers
exit 0 exit 0
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