diff --git a/.vscode/launch.json b/.vscode/launch.json index ac22f02..df2718a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "cwd": "${workspaceFolder}/tests/build/bin/", "program": "${workspaceFolder}/tests/build/bin/ut-test", "environment": [ {"name": "LD_LIBRARY_PATH", "value":"${workspaceFolder}/tests/build/bin/"} ], - "args": [ "-l", "${workspaceFolder}/tests/logs/", "-p", "${workspaceFolder}/tests/build/bin/assets/test_kvp.yaml"], + "args": [ "-l", "${workspaceFolder}/tests/logs/", "-p", "${workspaceFolder}/tests/build/bin/assets/test_kvp.yaml", "-p", "${workspaceFolder}/tests/build/bin/assets/config-test.yaml"], "MIMode": "gdb", "miDebuggerPath": "gdb", "setupCommands": [ diff --git a/build.sh b/build.sh index 0ce399a..12c0452 100755 --- a/build.sh +++ b/build.sh @@ -67,7 +67,7 @@ popd > /dev/null # ${MY_DIR} # Therefore in that case it warns you but doesnt' chnage to that version, which could cause your tests to break. # Change this to upgrade your ut-control Major versions. Non ABI Changes 1.x.x are supported, between major revisions -UT_CONTROL_PROJECT_VERSION="1.6.1" # Fixed version +UT_CONTROL_PROJECT_VERSION="1.6.1" # Fixed version, #TODO: change to 1.6.2 once ut-control is merged # Clone the Unit Test Requirements UT_CONTROL_REPO=git@github.com:rdkcentral/ut-control.git @@ -85,6 +85,7 @@ function check_ut_control_revision() echo -e ${RED}--- New Version of ut-control released [${UT_NEXT_VERSION}] consider upgrading ---${NC} fi fi + UT_CONTROL_PROJECT_VERSION=feature/gh62-multiple-profile-input-support echo -e ${YELLOW}ut-control version selected:[${UT_CONTROL_PROJECT_VERSION}]${NC} popd > /dev/null } diff --git a/tests/src/assets/config-test.yaml b/tests/src/assets/config-test.yaml new file mode 100644 index 0000000..695fa34 --- /dev/null +++ b/tests/src/assets/config-test.yaml @@ -0,0 +1,59 @@ +profile: DUMMY_PROFILE # Dummy string value +hal version: X.X.X # Dummy string value +components: # Array of dummy components + - name: ComponentManager1 # Dummy component object begins + interfaceVersion: X # Dummy integer value + ResourceList1: # Dummy resource list + - id: 0 # Dummy resource object begins + dummyCapabilities: # Array of dummy capabilities + - DUMMY_CAPABILITY_1 + - DUMMY_CAPABILITY_2 + - DUMMY_CAPABILITY_3 + - DUMMY_CAPABILITY_4 + supportsFeatureX: true + - id: 1 + dummyCapabilities: + - DUMMY_CAPABILITY_1 + - DUMMY_CAPABILITY_2 + - DUMMY_CAPABILITY_3 + - DUMMY_CAPABILITY_4 + supportsFeatureX: true + - name: ComponentManager2 # Another dummy component + interfaceVersion: X + platformCapabilities: + - supportsFeatureY: false + sampleRateHz: 00000 + pcmFormat: DUMMY_FORMAT + supportsAdditionalFormat: false + ResourceList2: + - id: 0 + - id: 1 + - name: ComponentManager3 + interfaceVersion: X + supportedModes: + - DUMMY_MODE + ResourceList3: + - id: 0 + dummyCapabilities: + - capability: DUMMY_CODEC_1 + maxFrameRate: XX + maxFrameWidth: XXXX + maxFrameHeight: XXXX + - capability: DUMMY_CODEC_2 + maxFrameRate: XX + maxFrameWidth: XXXX + maxFrameHeight: XXXX + supportedRanges: + - RANGE_1 + - RANGE_2 + - RANGE_3 + supportsFeatureZ: true + - id: 1 + dummyCapabilities: + - capability: DUMMY_CODEC_1 + maxFrameRate: XX + maxFrameWidth: XXXX + maxFrameHeight: XXXX + supportedRanges: + - RANGE_1 + supportsFeatureZ: true \ No newline at end of file diff --git a/tests/src/c_source/ut_test_kvp_profile.c b/tests/src/c_source/ut_test_kvp_profile.c index 9669fae..97251bb 100644 --- a/tests/src/c_source/ut_test_kvp_profile.c +++ b/tests/src/c_source/ut_test_kvp_profile.c @@ -30,6 +30,7 @@ #include #define KVP_VALID_TEST_ASSERT_YAML_FILE "assets/test_kvp.yaml" +#define KVP_VALID_TEST_CONFIG_YAML_FILE "assets/config-test.yaml" #define KVP_VALID_TEST_ASSERT_JSON_FILE "assets/test_kvp.json" static UT_test_suite_t *gpAssertSuite1 = NULL; @@ -143,8 +144,21 @@ void test_ut_kvp_profile_open( void ) { UT_LOG_STEP( "test_ut_kvp_profile_open - start" ); ut_kvp_profile_open( KVP_VALID_TEST_ASSERT_YAML_FILE ); - ut_kvp_profile_open( KVP_VALID_TEST_ASSERT_YAML_FILE ); - ut_kvp_profile_open( KVP_VALID_TEST_ASSERT_YAML_FILE ); + ut_kvp_profile_open( KVP_VALID_TEST_CONFIG_YAML_FILE ); + ut_kvp_instance_t *pInstance; + + pInstance = ut_kvp_profile_getInstance(); + char* kvpdata = ut_kvp_getData(pInstance); + + if(kvpdata != NULL) + { + // Print the emitted KVP string + printf("%s\n", kvpdata); + + // Free the emitted KVP string + free(kvpdata); + } + UT_LOG_STEP( "test_ut_kvp_profile_open - end" ); }