Jaeden Amero
dfcf84aea5
tests: Update generator with Mbed Crypto comments
...
Update comments in the top of the test code generator script with the
name of the parent project.
2019-04-25 11:46:21 +01:00
Gilles Peskine
e915d532a6
Silence pylint
...
Silence pylint in specific places where we're doing slightly unusual
or dodgy, but correct.
2019-02-27 11:03:25 +01:00
Ron Eldor
b9b3813649
Separate REGEX of MACRO to groups
...
Seperate the REGEX into identifier, condition and value, into groups,
to behandled differently.
2018-11-27 16:37:49 +02:00
Ron Eldor
d5062dedeb
Add conditional dependency to tests
...
Add a way to check compile time defionitions values, for determining
whether to skip tests.
2018-11-26 14:23:14 +02:00
Mohammad Azim Khan
5cb7017077
Less obscure test suites template
2018-08-06 11:42:56 +01:00
Mohammad Azim Khan
d2d0112ca8
Style fixes
2018-08-06 11:42:56 +01:00
Mohammad Azim Khan
440d8737c6
Fix macro validation regex
2018-08-06 11:42:56 +01:00
Mohammad Azim Khan
32cbcdac8f
Fix Pylint errors in Python scripts
2018-08-06 11:42:56 +01:00
Azim Khan
630281349e
Replaced escaped_split() logic with regex
2018-08-06 11:42:56 +01:00
Azim Khan
fcdf685302
Make test function parsing robust
...
This commit enhances parsing of the test function in generate_test_code.py for
cases where return type and function name are on separate lines.
2018-08-06 11:42:56 +01:00
Azim Khan
4084ec7ae5
Fixed unit tests in test_generate_test_code.py
2018-08-06 11:42:56 +01:00
Azim Khan
8d686bfdb1
Incorporated code revoew comments.
2018-08-06 11:42:56 +01:00
Azim Khan
b31aa44e16
Fix style errors reported by pylint
2018-08-06 11:42:56 +01:00
Azim Khan
aee05bbe70
Add test suite framework summary
2018-08-06 11:42:56 +01:00
Azim Khan
5fcca46a3a
Rename HexParam_t -> data_t for consistent coding style
2018-08-06 11:42:06 +01:00
Azim Khan
e3b26af7c0
Improve documentation in generate_test_code.py
2018-08-06 11:42:06 +01:00
Azim Khan
040b6a2281
Wrap code to 79 character limit
2018-08-06 11:42:06 +01:00
Azim Khan
936ea9302a
Strip whitespaces added by decode() function
2018-08-06 11:42:06 +01:00
Mohammad Azim Khan
00c4b090c1
Change intermediate data file extension to .datax
2018-08-06 11:42:06 +01:00
Mohammad Azim Khan
8f6e8cfcc7
Print line number with data file error
2018-08-06 11:40:58 +01:00
Mohammad Azim Khan
3b06f226e9
Replace asserts with exceptions in generate_test_code.py
2018-08-06 11:40:58 +01:00
Mohammad Azim Khan
c3521dfdd6
Fix generate_test_code.py unit tests
2018-08-06 11:40:58 +01:00
Gilles Peskine
667f7f8369
Fix generation of #line directives in Python 2
...
When using Python 2 (which is done in the Makefile), all #line
directives from the test code were generated with the line number 1.
This traces back to the change in the method name for generators in
Python 2 (next) vs Python 3 (__next__). Override both methods so that
the script remains compatible with both Python 2 and Python 3.
2018-08-06 11:40:58 +01:00
Gilles Peskine
7776141a16
Don't generate lines with only whitespace
2018-08-06 11:40:58 +01:00
Mohammad Azim Khan
b73159d639
Remove white spaces caught by check-files.py
2018-08-06 11:40:58 +01:00
Mohammad Azim Khan
1ec7e6f3d9
Python3 compatible generate_test_code.py
2018-08-06 11:40:58 +01:00
Mohammad Azim Khan
78befd9019
Rename generate_code.py -> generate_test_code.py
2018-08-06 11:40:58 +01:00