File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
scripts/mbedtls_framework Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ """Library for building a TF-PSA-Crypto test driver from the built-in driver
2+ """
3+
4+ # Copyright The Mbed TLS Contributors
5+ # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
6+ #
7+
8+ import argparse
9+
10+ from pathlib import Path
11+
12+ def get_parsearg_base () -> argparse .ArgumentParser :
13+ """ Get base arguments for scripts building a TF-PSA-Crypto test driver """
14+ parser = argparse .ArgumentParser (description = \
15+ "Clone partially builtin tree, rewrite header inclusions and prefix"
16+ "exposed C identifiers." )
17+
18+ parser .add_argument ("dst_dir" , metavar = "DST_DIR" ,
19+ help = "Destination directory.\n "
20+ " - If absolute, used as-is.\n "
21+ " - If relative, interpreted relative to the repository root.\n " )
22+ parser .add_argument ("--driver" , default = "libtestdriver1" , metavar = "DRIVER" ,
23+ help = "Test driver name (default: %(default)s)." )
24+ return parser
25+
26+ class TestDriverGenerator :
27+ """A TF-PSA-Crypto test driver generator"""
28+ def __init__ (self , dst_dir : Path , driver : str ):
29+ self .dst_dir = dst_dir
30+ self .driver = driver
31+ # Path of 'dst_dir'/include/'driver'
32+ self .test_driver_include_dir = None #type: Path | None
You can’t perform that action at this time.
0 commit comments