• Home
  • Raw
  • Download

Lines Matching +full:dependency +full:- +full:check

5 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
16 ------
24 ---------------------
35 that macro should be specified as a dependency of the test.
48 enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:8:-1
51 ---------------
55 of functions and function dependencies. Check any existing functions
59 ----------
61 - Generating test_suite_<module>[.<optional sub module>].c file
63 - Building each source file into executables.
64 - Running each executable and printing report.
68 - Process main()
69 - Reading .data file and dispatching test cases.
70 - Platform specific test case execution
71 - Dependency checking
72 - Integer expression evaluation
73 - Test function dispatch
89 ------------
93 --------------
99 ---------
103 dependency checks, expression evaluation and function dispatch. These
139 dependency Id and return status: if
140 the dependency is defined or not.
196 C_IDENTIFIER_REGEX = r'!?[a-z_][a-z0-9_]*'
199 CONDITION_VALUE_REGEX = r'[-+]?(0x[0-9a-f]+|0|[1-9][0-9]*)'
223 def __init__(self, file_name) -> None:
229 # private mix-in file object
272 Split NOT character '!' from dependency. Used by gen_dependencies()
274 :param dep: Dependency list
285 dependency list. Caller uses the generated preprocessor code to
287 A dependency in the input list can have a leading '!' character
288 to negate a condition. '!' is separated from the dependency using
289 function split_dep() and proper preprocessor check is generated
306 Similar to gen_dependencies() but generates dependency checks in one line.
310 :return: Preprocessor check code
348 composed of a compile time check for the test function
388 raise GeneratorInputError("file: %s - end pattern [%s] not found!" %
394 def validate_dependency(dependency): argument
397 :param dependency: Input macro dependency
398 :return: input dependency stripped of leading & trailing white spaces.
400 dependency = dependency.strip()
401 if not re.match(CONDITION_REGEX, dependency, re.I):
402 raise GeneratorInputError('Invalid dependency %s' % dependency)
403 return dependency
436 str(error) + " - %s:%d" % (funcs_f.name, funcs_f.line_no))
440 raise GeneratorInputError("file: %s - end dependency pattern [%s]"
492 args_dispatch.append('((mbedtls_test_argument_t *) params[%d])->sint' % arg_idx)
502 len_initializer = '((mbedtls_test_argument_t *) params[%d])->len' % (arg_idx+1)
558 if code.find('exit:') == -1:
599 while closing == -1:
629 # Check function signature. Function signature may be split
638 # check if we have full signature i.e. split in more lines
651 raise GeneratorInputError("file: %s - Test functions not found!" %
659 # avoid "-Wstrict-prototypes" warnings from clang
671 raise GeneratorInputError("file: %s - end case pattern [%s] not "
718 "file: %s - function %s re-declared at line %d" %
757 identifiers. Mainly for optimising space for on-target
762 dependency list and function argument list.
789 # Check dependencies
797 str(error) + " - %s:%d" %
815 Generate code for checking dependency with the associated
818 :param dep_id: Dependency identifier
819 :param dep: Dependency macro
820 :return: Dependency check code
823 raise GeneratorInputError("Dependency Id should be a positive "
827 raise GeneratorInputError("Dependency should not be an empty string.")
829 dependency = re.match(CONDITION_REGEX, dep, re.I)
830 if not dependency:
831 raise GeneratorInputError('Invalid dependency %s' % dep)
833 _defined = '' if dependency.group(2) else 'defined'
834 _cond = dependency.group(2) if dependency.group(2) else ''
835 _value = dependency.group(3) if dependency.group(3) else ''
847 macro=dependency.group(1), id=dep_id,
859 :return: Expression check code
878 the string form with identifiers. Also, generates dependency
879 check code.
884 that are global to this re-entrant function.
885 :return: returns dependency check code.
902 INT_VAL_REGEX = re.compile(r'-?(\d+|0x[0-9a-f]+)$', re.I)
903 def val_is_int(val: str) -> bool:
914 check code.
920 expressions that are global to this re-entrant function.
921 :return: Returns expression check code.
953 :param dep_check_code: Dependency check code
954 :param expression_code: Expression check code
955 :return: Dependency and expression code guarded by test suite
998 space for on-target execution.
999 It also generates test case dependency check code and expression
1007 :return: Returns dependency and expression check code
1099 named = "__MBEDTLS_TEST_TEMPLATE__(?P<named>[A-Z][_A-Z0-9]*)"
1209 parser.add_argument("-f", "--functions-file",
1215 parser.add_argument("-d", "--data-file",
1221 parser.add_argument("-t", "--template-file",
1227 parser.add_argument("-s", "--suites-dir",
1233 parser.add_argument("--helpers-file",
1239 parser.add_argument("-p", "--platform-file",
1245 parser.add_argument("-o", "--out-dir",