mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-25 13:43:31 +00:00
Keep the description in one place, just refer it
Delete the duplicated file description and refer to the original one in generate_bignum_tests.py. Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
parent
63aae68b8f
commit
a9d82dd0a2
@ -1,41 +1,8 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
"""Generate test data for ecp functions.
|
"""Generate test data for ecp functions.
|
||||||
|
|
||||||
With no arguments, generate all test data. With non-option arguments,
|
The command line usage, class structure and available methods are the same
|
||||||
generate only the specified files.
|
as in generate_bignum_tests.py.
|
||||||
|
|
||||||
Class structure:
|
|
||||||
|
|
||||||
Child classes of test_data_generation.BaseTarget (file targets) represent an output
|
|
||||||
file. These indicate where test cases will be written to, for all subclasses of
|
|
||||||
this target. Multiple file targets should not reuse a `target_basename`.
|
|
||||||
|
|
||||||
Each subclass derived from a file target can either be:
|
|
||||||
- A concrete class, representing a test function, which generates test cases.
|
|
||||||
- An abstract class containing shared methods and attributes, not associated
|
|
||||||
with a test function.
|
|
||||||
|
|
||||||
Both concrete and abstract subclasses can be derived from, to implement
|
|
||||||
additional test cases (see BignumCmp and BignumCmpAbs for examples of deriving
|
|
||||||
from abstract and concrete classes).
|
|
||||||
|
|
||||||
|
|
||||||
Adding test case generation for a function:
|
|
||||||
|
|
||||||
A subclass representing the test function should be added, deriving from a
|
|
||||||
file target such as BignumTarget. This test class must set/implement the
|
|
||||||
following:
|
|
||||||
- test_function: the function name from the associated .function file.
|
|
||||||
- test_name: a descriptive name or brief summary to refer to the test
|
|
||||||
function.
|
|
||||||
- arguments(): a method to generate the list of arguments required for the
|
|
||||||
test_function.
|
|
||||||
- generate_function_tests(): a method to generate TestCases for the function.
|
|
||||||
This should create instances of the class with required input data, and
|
|
||||||
call `.create_test_case()` to yield the TestCase.
|
|
||||||
|
|
||||||
Additional details and other attributes/methods are given in the documentation
|
|
||||||
of BaseTarget in test_data_generation.py.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Copyright The Mbed TLS Contributors
|
# Copyright The Mbed TLS Contributors
|
||||||
|
Loading…
x
Reference in New Issue
Block a user