mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-12 10:13:39 +00:00
generate_test_[keys/cert_macros]: minor fixes
- remove new line at beginning of test_keys.h - add footer at the end of both generated files Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
cc403cb6ec
commit
3fcaf6cc8a
@ -40,3 +40,4 @@
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
/* End of generated file */
|
||||
|
@ -72,7 +72,8 @@ def generate(values=[], output=None):
|
||||
"""
|
||||
template_loader = jinja2.FileSystemLoader(DATA_FILES_PATH)
|
||||
template_env = jinja2.Environment(
|
||||
loader=template_loader, lstrip_blocks=True, trim_blocks=True)
|
||||
loader=template_loader, lstrip_blocks=True, trim_blocks=True,
|
||||
keep_trailing_newline=True)
|
||||
|
||||
def read_as_c_array(filename):
|
||||
with open(filename, 'rb') as f:
|
||||
|
@ -92,7 +92,7 @@ def get_look_up_table_entry(key_type: str, group_id_or_keybits: str,
|
||||
|
||||
def write_output_file(output_file_name: str, arrays: List[str], look_up_table: List[str]):
|
||||
with open(output_file_name, 'wt') as output:
|
||||
output.write("""
|
||||
output.write("""\
|
||||
/*********************************************************************************
|
||||
* This file was automatically generated from tests/scripts/generate_test_keys.py.
|
||||
* Please do not edit it manually.
|
||||
@ -112,6 +112,8 @@ struct predefined_key_element {{
|
||||
struct predefined_key_element predefined_keys[] = {{
|
||||
{}
|
||||
}};
|
||||
|
||||
/* End of generated file */
|
||||
""".format("\n".join(look_up_table)))
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user