Commit graph

13 commits

Author SHA1 Message Date
Mohammad Azim Khan 78befd9019 Rename generate_code.py -> generate_test_code.py 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 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 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
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
Renamed from tests/scripts/gen_mbed_code.py (Browse further)