allow enabling / disabling of individual tests based on a configuration input file into the test.
This allows for control based on configuration to disable specific tests
Related to #13 you can use this framework internals to allow the reading of a configuration, and driving the enabling / disabling of each test as required.
Rearrange switches in the main for ut-core, due to this.
Add switch to support platform --profile
e.g.
hdmiProfile.yml
hdmicec:
config:
extendedEnumsSupported: false
Passing a profile into the testing suite
./hdmi_cec -p hdmiProfile.yml
then in the testing code you would perform
bool extendedEnumsSupported = ut_kvp_getBoolField( ut_getPlatformProfile(), ""hdmicec/config/extendedEnumsSupported" );
if ( extendedEnumsSupported == false )
{
/* Complete suite is disabled due to supportExtendedEnums == false */
pSuite = UT_add_suite("test extended functions ", NULL, NULL );
UT_add_test(pSuite, "test extended bool", test_bool);
UT_add_test(pSuite, "test extended string", test_string);
UT_add_test(pSuite, "test extended uint32", test_uint32);
}
So basically:
void *ut_getPlatformProfile( void ) → Needs to be added to the ut_main.c ut-.h, whereas part of the switch processing the global is set up by loading via file during the processing of the -p switch.
Scope
allow enabling / disabling of individual tests based on a configuration input file into the test.
This allows for control based on configuration to disable specific tests
Related to #13 you can use this framework internals to allow the reading of a configuration, and driving the enabling / disabling of each test as required.
ut-core
, due to this.e.g.
hdmiProfile.yml
then in the testing code you would perform
So basically:
void *ut_getPlatformProfile( void )
→ Needs to be added to theut_main.c
ut-.h, whereas part of the switch processing the global is set up by loading via file during the processing of the-p
switch.Extended Data with Examples
Example of profile for HDMI