68dbc94720
Merge remote-tracking branch 'public/pr/1951' into development
2018-08-30 00:56:56 +01:00
2f5aa4c64e
all.sh: Add builds allowing to test dropping buffered messages
...
This commit adds two builds to all.sh which use a value of
MBEDTLS_SSL_DTLS_MAX_BUFFERING that allows to run the
reordering tests in ssl-opt.sh introduced in the last commit.
2018-08-24 14:48:11 +01:00
5cb7017077
Less obscure test suites template
2018-08-06 11:42:56 +01:00
d2d0112ca8
Style fixes
2018-08-06 11:42:56 +01:00
440d8737c6
Fix macro validation regex
2018-08-06 11:42:56 +01:00
ee6529eb83
Add generate_test_code.py unit tests in all.sh
2018-08-06 11:42:56 +01:00
21798105f6
Pylint tests in all.sh
2018-08-06 11:42:56 +01:00
539aa06f64
Fix Python 2 & 3 compatibility in test_generate_test_code.py
2018-08-06 11:42:56 +01:00
32cbcdac8f
Fix Pylint errors in Python scripts
2018-08-06 11:42:56 +01:00
630281349e
Replaced escaped_split() logic with regex
2018-08-06 11:42:56 +01:00
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
4084ec7ae5
Fixed unit tests in test_generate_test_code.py
2018-08-06 11:42:56 +01:00
8d686bfdb1
Incorporated code revoew comments.
2018-08-06 11:42:56 +01:00
b31aa44e16
Fix style errors reported by pylint
2018-08-06 11:42:56 +01:00
aee05bbe70
Add test suite framework summary
2018-08-06 11:42:56 +01:00
5fcca46a3a
Rename HexParam_t -> data_t for consistent coding style
2018-08-06 11:42:06 +01:00
951a2c8898
Improve documentation in mbedtls_test.py
2018-08-06 11:42:06 +01:00
e3b26af7c0
Improve documentation in generate_test_code.py
2018-08-06 11:42:06 +01:00
b98e6eec58
Replace asserts with exceptions in mbedtls_test.py
2018-08-06 11:42:06 +01:00
040b6a2281
Wrap code to 79 character limit
2018-08-06 11:42:06 +01:00
936ea9302a
Strip whitespaces added by decode() function
2018-08-06 11:42:06 +01:00
00c4b090c1
Change intermediate data file extension to .datax
2018-08-06 11:42:06 +01:00
8f6e8cfcc7
Print line number with data file error
2018-08-06 11:40:58 +01:00
3b06f226e9
Replace asserts with exceptions in generate_test_code.py
2018-08-06 11:40:58 +01:00
c3521dfdd6
Fix generate_test_code.py unit tests
2018-08-06 11:40:58 +01:00
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
7776141a16
Don't generate lines with only whitespace
2018-08-06 11:40:58 +01:00
9b06f37601
Give execute permissions to Python scripts
2018-08-06 11:40:58 +01:00
b73159d639
Remove white spaces caught by check-files.py
2018-08-06 11:40:58 +01:00
1ec7e6f3d9
Python3 compatible generate_test_code.py
2018-08-06 11:40:58 +01:00
78befd9019
Rename generate_code.py -> generate_test_code.py
2018-08-06 11:40:58 +01:00
b522929666
Add support for per test suite helper functions
2018-08-06 11:40:58 +01:00
f0e42fbd1f
Add missing documentation and fix file doc strings
2018-08-06 11:40:58 +01:00
9540261a76
Incorporated code review comments
2018-08-06 11:40:58 +01:00
d61b837fac
Update unit tests for change in test suites code generator
...
Code generator has been modified to generate case statements for dependency checks and expression checks.
This commit updates the unit tests accordingly.
2018-08-06 11:40:58 +01:00
b1c2d0f946
Use switch instead if if-else for dependency and expression checks.
2018-08-06 11:40:58 +01:00
663d4702c5
Incorporate code review suggestions in mbedtls_test.py
2018-08-06 11:40:58 +01:00
599cd247e6
Update unit tests for code generator and make code generator more testable.
2018-08-06 11:40:58 +01:00
acc5473ac9
Use FileWrapper class in place of file where line number is required
2018-08-06 11:40:57 +01:00
5e2ac1fb29
Updated generate_code.py unit tests
2018-08-06 11:40:57 +01:00
4b54323bcb
Unit test generate_copy.py
2018-08-06 11:40:57 +01:00
13c6bfbc2a
Gaurd test suite headers with suite dependency
...
Test suite header code was not gaurded with test suite dependency.
But some test suites have additional code in the headers section.
Variables in that section become unused if suite functions are
gaurded. Hence gaurded the headers section.
But this changed cuased missing types in get_expression() function
that was originally accessing types defined through suite headers.
Hence had to gaurd expressions code as well.
Gaurding expressions does not allow parsing the parameters when
some types or hash defs are gaurded. Hence added function
check_test() to check if test is allowed or not before parsing the
parameters.
2018-08-06 11:40:57 +01:00
1de892b85f
Update code as old template and generator is replaced with new one
2018-08-06 11:40:57 +01:00
191e904bb2
Replace old template and code generator with new ones. Keep names
2018-08-06 11:40:57 +01:00
975d97eb8b
Remove old test suite template and code generator script
2018-08-06 11:40:57 +01:00
2397bbaa01
Update test generator for use of struct for hex parameters
2018-08-06 11:40:57 +01:00
d59391afcd
Add support for sending hex parameters
2018-08-06 11:40:57 +01:00
5e7f8df800
Print Greentea __testcase_name indicator for Greentea to mark the test
2018-08-06 11:40:57 +01:00
a57a420985
Add hex parameter dispatch
2018-08-06 11:40:57 +01:00
7a0d84fccc
On target test host test script
2018-08-06 11:40:57 +01:00