|
18 | 18 | import sys
|
19 | 19 | from typing import Iterable, List, Optional, Tuple
|
20 | 20 |
|
| 21 | +from mbedtls_framework import build_tree |
21 | 22 | from mbedtls_framework import c_build_helper
|
22 | 23 | from mbedtls_framework.macro_collector import InputsForTest, PSAMacroEnumerator
|
23 | 24 | from mbedtls_framework import typing_util
|
@@ -155,25 +156,39 @@ def report(self, out: typing_util.Writable) -> None:
|
155 | 156 | out.write(' PASS\n')
|
156 | 157 |
|
157 | 158 | HEADERS = ['psa/crypto.h', 'psa/crypto_extra.h', 'psa/crypto_values.h']
|
158 |
| -TEST_SUITES = ['tf-psa-crypto/tests/suites/test_suite_psa_crypto_metadata.data'] |
| 159 | + |
| 160 | +if build_tree.is_mbedtls_3_6(): |
| 161 | + TEST_SUITES = ['tests/suites/test_suite_psa_crypto_metadata.data'] |
| 162 | +else: |
| 163 | + TEST_SUITES = ['tf-psa-crypto/tests/suites/test_suite_psa_crypto_metadata.data'] |
159 | 164 |
|
160 | 165 | def main():
|
161 | 166 | parser = argparse.ArgumentParser(description=globals()['__doc__'])
|
162 |
| - parser.add_argument('--include', '-I', |
163 |
| - action='append', default=['tf-psa-crypto/include', |
164 |
| - 'tf-psa-crypto/drivers/builtin/include', |
165 |
| - 'tf-psa-crypto/drivers/everest/include', |
166 |
| - 'include'], |
167 |
| - help='Directory for header files') |
| 167 | + if build_tree.is_mbedtls_3_6(): |
| 168 | + parser.add_argument('--include', '-I', |
| 169 | + action='append', default=['include'], |
| 170 | + help='Directory for header files') |
| 171 | + else: |
| 172 | + parser.add_argument('--include', '-I', |
| 173 | + action='append', default=['tf-psa-crypto/include', |
| 174 | + 'tf-psa-crypto/drivers/builtin/include', |
| 175 | + 'tf-psa-crypto/drivers/everest/include', |
| 176 | + 'include'], |
| 177 | + help='Directory for header files') |
168 | 178 | parser.add_argument('--keep-c',
|
169 | 179 | action='store_true', dest='keep_c', default=False,
|
170 | 180 | help='Keep the intermediate C file')
|
171 | 181 | parser.add_argument('--no-keep-c',
|
172 | 182 | action='store_false', dest='keep_c',
|
173 | 183 | help='Don\'t keep the intermediate C file (default)')
|
174 |
| - parser.add_argument('--program', |
175 |
| - default='tf-psa-crypto/programs/psa/psa_constant_names', |
176 |
| - help='Program to test') |
| 184 | + if build_tree.is_mbedtls_3_6(): |
| 185 | + parser.add_argument('--program', |
| 186 | + default='programs/psa/psa_constant_names', |
| 187 | + help='Program to test') |
| 188 | + else: |
| 189 | + parser.add_argument('--program', |
| 190 | + default='tf-psa-crypto/programs/psa/psa_constant_names', |
| 191 | + help='Program to test') |
177 | 192 | parser.add_argument('--show',
|
178 | 193 | action='store_true',
|
179 | 194 | help='Show tested values on stdout')
|
|
0 commit comments