Mohammad Azim Khan
78befd9019
Rename generate_code.py -> generate_test_code.py
2018-08-06 11:40:58 +01:00
Mohammad Azim Khan
7eb55687c4
Set OS specific python executable name
2018-08-06 11:40:58 +01:00
Mohammad Azim Khan
b522929666
Add support for per test suite helper functions
2018-08-06 11:40:58 +01:00
Azim Khan
05d83fa406
Put parentheses around macro arguments
2018-08-06 11:40:58 +01:00
Azim Khan
36e5fac0fb
Rephrase confusing function description
2018-08-06 11:40:58 +01:00
Azim Khan
317efe85e1
Adapt new test gcm_bad_parameters() to on target testing changes
2018-08-06 11:40:58 +01:00
Azim Khan
f0e42fbd1f
Add missing documentation and fix file doc strings
2018-08-06 11:40:58 +01:00
Mohammad Azim Khan
9540261a76
Incorporated code review comments
2018-08-06 11:40:58 +01:00
Azim Khan
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
Azim Khan
b1c2d0f946
Use switch instead if if-else for dependency and expression checks.
2018-08-06 11:40:58 +01:00
Azim Khan
d61a4384d8
incorporate code review comment in embedded_test.function
2018-08-06 11:40:58 +01:00
Azim Khan
663d4702c5
Incorporate code review suggestions in mbedtls_test.py
2018-08-06 11:40:58 +01:00
Azim Khan
599cd247e6
Update unit tests for code generator and make code generator more testable.
2018-08-06 11:40:58 +01:00
Azim Khan
acc5473ac9
Use FileWrapper class in place of file where line number is required
2018-08-06 11:40:57 +01:00
Azim Khan
5e2ac1fb29
Updated generate_code.py unit tests
2018-08-06 11:40:57 +01:00
Azim Khan
4b54323bcb
Unit test generate_copy.py
2018-08-06 11:40:57 +01:00
Azim Khan
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
Mohammad Azim Khan
8c4d5ba763
Update CMakeList.txt with new test suites code generator
2018-08-06 11:40:57 +01:00
Mohammad Azim Khan
cf32c45bfd
Add missing headers and fix name change issues
2018-08-06 11:40:57 +01:00
Azim Khan
1de892b85f
Update code as old template and generator is replaced with new one
2018-08-06 11:40:57 +01:00
Azim Khan
191e904bb2
Replace old template and code generator with new ones. Keep names
2018-08-06 11:40:57 +01:00
Azim Khan
975d97eb8b
Remove old test suite template and code generator script
2018-08-06 11:40:57 +01:00
Azim Khan
2397bbaa01
Update test generator for use of struct for hex parameters
2018-08-06 11:40:57 +01:00
Azim Khan
d30ca130e8
Combine hex parameters in a struct
2018-08-06 11:40:57 +01:00
Azim Khan
5cfc06832e
Fix name conflict in function params after hexify/unhexify change
2018-08-06 11:40:57 +01:00
Azim Khan
3e5d0004ab
Update Greentea API header
2018-08-06 11:40:57 +01:00
Azim Khan
47b40609de
Fix RSA test suite bugged by hexify/unhexify change
2018-08-06 11:40:57 +01:00
Azim Khan
392267a7c8
Fix missing data in the RSA test vectors file
2018-08-06 11:40:57 +01:00
Azim Khan
b3a103c499
Put else in it's own line
2018-08-06 11:40:57 +01:00
Azim Khan
d59391afcd
Add support for sending hex parameters
2018-08-06 11:40:57 +01:00
Azim Khan
46c9b1f196
Fix test functions and data after moving hexify/unhexify out
...
- Separate string and hex parameter as unhexify is moved out of the function. It's input should only be hex.
- Fix test mbedtls_ccm_encrypt_and_tag that grows input message buffer with tag
- Add missing expected length parameter in ECP TLS tests
- Add deleted TEST_ASSERT and mbedtls calls that got removed in script based code generation
2018-08-06 11:40:57 +01:00
Azim Khan
5e7f8df800
Print Greentea __testcase_name indicator for Greentea to mark the test
2018-08-06 11:40:57 +01:00
Azim Khan
a57a420985
Add hex parameter dispatch
2018-08-06 11:40:57 +01:00
Azim Khan
184447e7e4
Add proper handling of hex data
2018-08-06 11:40:57 +01:00
Azim Khan
f1aaec9888
Intermediate hexify out change
2018-08-06 11:40:57 +01:00
Azim Khan
9079170f6e
Adapt code for scripting out hexify/unhexify code
2018-08-06 11:40:57 +01:00
Azim Khan
3499a9e41b
Add hex comparison function
2018-08-06 11:40:57 +01:00
Azim Khan
0574632b30
Update Greentea client API calls
2018-08-06 11:40:57 +01:00
Azim Khan
ee6c0189df
Unify test setup errors for sending to host
2018-08-06 11:40:57 +01:00
Azim Khan
ec024483ae
Fix line no. directive
2018-08-06 11:40:57 +01:00
Mohammad Azim Khan
67735d540b
Fix name conflict and implicit use of functions from string.h
2018-08-06 11:40:57 +01:00
Mohammad Azim Khan
7a0d84fccc
On target test host test script
2018-08-06 11:40:57 +01:00
Mohammad Azim Khan
fff4904e6b
mbed-os test code generator
2018-08-06 11:40:57 +01:00
Mohammad Azim Khan
1f29be7241
Make target for on mbed testing
...
New target gen-mbed-test generates mebdtls tests in mbed-os test format.
i.e. a dir tree like TESTS/<testgroup>/[<sub testgroup>/]<test case>.
The TESTS dir can then be imported into mbed-os to compile tests with mbed-os.
2018-08-06 11:40:57 +01:00
Mohammad Azim Khan
94aefaf314
Optimise makefile targets
2018-08-06 11:32:29 +01:00
Simon Butcher
5f26b11ffa
Change test dependencies to RC4 from DES
...
Some tests were dependent on DES yet actually used RC4. Likely a copy and paste
error. This change fixes them.
2018-07-27 17:15:39 +01:00
Jaeden Amero
193c86425e
Update version to 2.12.0
2018-07-25 15:42:26 +01:00
Simon Butcher
729d7814c8
Merge remote-tracking branch 'public/pr/779' into development
2018-07-24 17:20:36 +01:00
Simon Butcher
2c92949e0a
Merge remote-tracking branch 'public/pr/1198' into development
2018-07-24 17:20:17 +01:00
Simon Butcher
c88c627fba
Merge remote-tracking branch 'public/pr/1658' into development
2018-07-24 17:19:10 +01:00