Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: gh #78 : Adding tests in ut-core to support multiple inputs #158

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

kanjoe24
Copy link
Contributor

Adding tests in ut-core to support multiple inputs

@kanjoe24 kanjoe24 requested a review from a team as a code owner December 11, 2024 10:40
@kanjoe24 kanjoe24 force-pushed the feature/gh78-multiple-profile-input-support-ut-core branch from 99c67be to f9ab588 Compare December 11, 2024 10:51
@kanjoe24 kanjoe24 self-assigned this Dec 11, 2024
@kanjoe24 kanjoe24 added the enhancement New feature or request label Dec 11, 2024
@kanjoe24
Copy link
Contributor Author

kanjoe24 commented Dec 17, 2024

Logs from test

 ./run.sh
----------------- Test List ------------------------------
Suite: ut-kvp - assert open / close

 #  Test Name                          Active?

 1. kvp profile open()                    Yes
 2. kvp profile getInstance()             Yes
 3. kvp profile close()                   Yes
----------------------------------------------------------
Total Number of Tests : 3

Enter number of test to select (1-3) : 1

2024-12-17-11:22:31, LOG   , ut_console.c,   633 : 

2024-12-17-11:22:31, LOG   , ut_console.c,   636 : Running Suite : ut-kvp - assert open / close
2024-12-17-11:22:31, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile open()'
2024-12-17-11:22:31, STEP  , ut_test_kvp_profile.c,   145 : test_ut_kvp_profile_open - start---
decodeTest:
  checkUint8IsDeHex: 0xde
  checkUint8IsDeDec: 222
  checkUint16IsDeadHex: 0xdead
  checkUint16IsDeadDec: 57005
  checkUint32IsDeadBeefHex: 0xdeadbeef
  checkUint32IsDeadBeefDec: 3735928559
  checkUint64IsDeadBeefHex: 0xdeadbeefdeadbeef
  checkUint64IsDeadBeefDec: 16045690984833335023
  checkStringDeadBeef: "the beef is dead"
  checkStringDeadBeef2: the beef is also dead
  checkStringDeadBeefNoQuotes: the beef is dead
  checkBoolFalse: false
  checkBoolFALSE: FALSE
  checkBoolFaLse: FaLSE
  checkBoolTRUE: TRUE
  checkBooltrue: true
  checkBoolTRuE: TRuE
  checkStringList:
  - stringA
  - stringB
  - stringC
  - stringA
  - stringB
  - stringC
  checkUint32List:
  - 720
  - 800
  - 1080
  - 720
  - 800
  - 1080
profile: DUMMY_PROFILE
hal version: X.X.X
components:
- name: ComponentManager1
  interfaceVersion: X
  ResourceList1:
  - id: 0
    dummyCapabilities:
    - 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
  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


2024-12-17-11:22:31, STEP  , ut_test_kvp_profile.c,   162 : test_ut_kvp_profile_open - end
2024-12-17-11:22:31, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile open()'

Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites      3      0    n/a      0        0
               tests     17      1      1      0        0
             asserts      0      0      0      0      n/a

Elapsed time =    0.002 seconds

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: 

@kanjoe24
Copy link
Contributor Author

Results from release script-ut-core

 ./release-test-script-ut-core.sh -t feature/gh78-multiple-profile-input-support-ut-core
UT_CORE_BRANCH_NAME = feature/gh78-multiple-profile-input-support-ut-core
UT_CONTROL_BRANCH_NAME = 
UT_CONTROL_BRANCH_NAME is empty
==========================================================
RESULTS for ubuntu 
On the branch feature/gh78-multiple-profile-input-support-ut-core
. PASS
framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
Openssl static lib does not exist. PASS 
CMake host binary does not exist. PASS 
build/linux/cpp_libs/lib/libgtest.a exists. PASS
build/linux/cpp_libs/lib/libgtest_main.a exists. PASS
==========================================================
==========================================================
RESULTS for VM-SYNC 
On the branch feature/gh78-multiple-profile-input-support-ut-core
. PASS
framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
framework/ut-control/build/linux/openssl/lib/libssl.a exists. PASS 
framework/ut-control/host-tools/CMake-3.30.0/build/bin/cmake exists. PASS 
build/linux/cpp_libs/lib/libgtest.a exists. PASS
build/linux/cpp_libs/lib/libgtest_main.a exists. PASS
==========================================================
==========================================================
RESULTS for dunfell_arm 
On the branch feature/gh78-multiple-profile-input-support-ut-core
. PASS
framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
build/arm/cpp_libs/lib/libgtest.a exists. PASS
build/arm/cpp_libs/lib/libgtest_main.a exists. PASS
==========================================================
==========================================================
RESULTS for dunfell_linux 
On the branch feature/gh78-multiple-profile-input-support-ut-core
. PASS
framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
Openssl static lib does not exist. PASS 
CMake host binary does not exist. PASS 
build/linux/cpp_libs/lib/libgtest.a exists. PASS
build/linux/cpp_libs/lib/libgtest_main.a exists. PASS
==========================================================
==========================================================
RESULTS for kirkstone_arm 
On the branch feature/gh78-multiple-profile-input-support-ut-core
. PASS
framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
build/arm/cpp_libs/lib/libgtest.a exists. PASS
build/arm/cpp_libs/lib/libgtest_main.a exists. PASS
==========================================================
==========================================================
RESULTS for kirkstone_linux 
On the branch feature/gh78-multiple-profile-input-support-ut-core
. PASS
framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
Openssl static lib does not exist. PASS 
CMake host binary does not exist. PASS 
build/linux/cpp_libs/lib/libgtest.a exists. PASS
build/linux/cpp_libs/lib/libgtest_main.a exists. PASS
==========================================================

@kanjoe24
Copy link
Contributor Author

Results for ./release-test-script-platform.sh with ./build_ut.sh for linux and ./build_ut.sh TARGET=arm for arm.

./release-test-script-platform.sh -t feature/gh78-multiple-profile-input-support-ut-core
UT_CORE_BRANCH_NAME = feature/gh78-multiple-profile-input-support-ut-core
UT_CONTROL_BRANCH_NAME = 
UT_CONTROL_BRANCH_NAME is empty
==========================================================
RESULTS for ubuntu 
On the branch feature/gh78-multiple-profile-input-support-ut-core
            . PASS
/home/jpn323/workspace/gh78-ut-core/scripts/rdk-halif-hdmi_cec-ubuntu
ut/bin/hal_test exists. PASS
ut/ut-core/framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
Openssl static lib does not exist. PASS 
CMake host binary does not exist. PASS 
==========================================================
==========================================================
RESULTS for VM-SYNC 
On the branch feature/gh78-multiple-profile-input-support-ut-core
            . PASS
/home/jpn323/workspace/gh78-ut-core/scripts/rdk-halif-hdmi_cec-VM-SYNC
ut/bin/hal_test exists. PASS
ut/ut-core/framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
ut/ut-core/framework/ut-control/build/linux/openssl/lib/libssl.a exists. PASS 
ut/ut-core/framework/ut-control/host-tools/CMake-3.30.0/build/bin/cmake exists. PASS 
==========================================================
==========================================================
RESULTS for dunfell_arm 
On the branch feature/gh78-multiple-profile-input-support-ut-core
            . PASS
/home/jpn323/workspace/gh78-ut-core/scripts/rdk-halif-hdmi_cec-dunfell_arm
ut/bin/hal_test exists. PASS
ut/ut-core/framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
ut/ut-core/framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
==========================================================
==========================================================
RESULTS for dunfell_linux 
On the branch feature/gh78-multiple-profile-input-support-ut-core
            . PASS
/home/jpn323/workspace/gh78-ut-core/scripts/rdk-halif-hdmi_cec-dunfell_linux
ut/bin/hal_test exists. PASS
CURL static lib does not exist. PASS 
Openssl static lib does not exist. PASS 
CMake host binary does not exist. PASS 
==========================================================
==========================================================
RESULTS for kirkstone_arm 
On the branch feature/gh78-multiple-profile-input-support-ut-core
            . PASS
/home/jpn323/workspace/gh78-ut-core/scripts/rdk-halif-hdmi_cec-kirkstone_arm
ut/bin/hal_test exists. PASS
ut/ut-core/framework/ut-control/build/arm/curl/lib/libcurl.a exists. PASS
ut/ut-core/framework/ut-control/build/arm/openssl/lib/libssl.a exists. PASS 
CMake host binary does not exist. PASS 
==========================================================
==========================================================
RESULTS for kirkstone_linux 
On the branch feature/gh78-multiple-profile-input-support-ut-core
            . PASS
/home/jpn323/workspace/gh78-ut-core/scripts/rdk-halif-hdmi_cec-kirkstone_linux
ut/bin/hal_test exists. PASS
ut/ut-core/framework/ut-control/build/linux/curl/lib/libcurl.a exists. PASS
Openssl static lib does not exist. PASS 
CMake host binary does not exist. PASS 
==========================================================

@kanjoe24 kanjoe24 requested a review from Ulrond December 17, 2024 14:49
Copy link
Contributor

@Ulrond Ulrond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor questions

build.sh Outdated Show resolved Hide resolved
tests/src/c_source/ut_test_kvp_profile.c Outdated Show resolved Hide resolved
@kanjoe24
Copy link
Contributor Author

logs

./run.sh 
Listing Filename:[/tmp/ut-log_2024-12-18_100133.log-Listing.xml]
Results Filename:[/tmp/ut-log_2024-12-18_100133.log]
Setting Log Path [./logs]
Listing Filename:[./logs/ut-log_2024-12-18_100133.log-Listing.xml]
Results Filename:[./logs/ut-log_2024-12-18_100133.log]
Using Profile[./assets/test_kvp.yaml]

2024-12-18-10:01:33, LOG   , ut_cunit.c,   147 : ---- start of test run ----

 ut-core: Wrapper framework for testing frameworks

***************** CUNIT CONSOLE - MAIN MENU ******************************
(R)un  (S)elect  (L)ist  (A)ctivate  (F)ailures  (O)ptions  (H)elp  (Q)uit
Enter command: s

--------------------- Registered Suites -----------------------------
 #  Suite Name                                                       Init? Cleanup? #Tests Active?

 1. ut-kvp - assert open / close                                      Yes      Yes      3     Yes
 2. ut-kvp - assert testing yaml                                      Yes      Yes      7     Yes
 3. ut-kvp - assert testing json                                      Yes      Yes      7     Yes
---------------------------------------------------------------------
Total Number of Suites : 3

Enter number of suite to select (1-3) : 1
Suite 'ut-kvp - assert open / close' selected.

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: l

----------------- Test List ------------------------------
Suite: ut-kvp - assert open / close

 #  Test Name                          Active?

 1. kvp profile open()                    Yes
 2. kvp profile getInstance()             Yes
 3. kvp profile close()                   Yes
----------------------------------------------------------
Total Number of Tests : 3

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: 1

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: r

2024-12-18-10:01:43, LOG   , ut_console.c,   633 : 

2024-12-18-10:01:43, LOG   , ut_console.c,   636 : Running Suite : ut-kvp - assert open / close
2024-12-18-10:01:43, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile open()'
2024-12-18-10:01:43, STEP  , ut_test_kvp_profile.c,   145 : test_ut_kvp_profile_open - start
2024-12-18-10:01:43, STEP  , ut_test_kvp_profile.c,   147 : ut_kvp_profile_open - assets/test_kvp.yaml
2024-12-18-10:01:43, STEP  , ut_test_kvp_profile.c,   149 : ut_kvp_profile_open - assets/config-test.yaml---
decodeTest:
  checkUint8IsDeHex: 0xde
  checkUint8IsDeDec: 222
  checkUint16IsDeadHex: 0xdead
  checkUint16IsDeadDec: 57005
  checkUint32IsDeadBeefHex: 0xdeadbeef
  checkUint32IsDeadBeefDec: 3735928559
  checkUint64IsDeadBeefHex: 0xdeadbeefdeadbeef
  checkUint64IsDeadBeefDec: 16045690984833335023
  checkStringDeadBeef: "the beef is dead"
  checkStringDeadBeef2: the beef is also dead
  checkStringDeadBeefNoQuotes: the beef is dead
  checkBoolFalse: false
  checkBoolFALSE: FALSE
  checkBoolFaLse: FaLSE
  checkBoolTRUE: TRUE
  checkBooltrue: true
  checkBoolTRuE: TRuE
  checkStringList:
  - stringA
  - stringB
  - stringC
  - stringA
  - stringB
  - stringC
  checkUint32List:
  - 720
  - 800
  - 1080
  - 720
  - 800
  - 1080
profile: DUMMY_PROFILE
hal version: X.X.X
components:
- name: ComponentManager1
  interfaceVersion: X
  ResourceList1:
  - id: 0
    dummyCapabilities:
    - 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
  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


2024-12-18-10:01:43, STEP  , ut_test_kvp_profile.c,   165 : test_ut_kvp_profile_open - end
2024-12-18-10:01:43, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile open()'
2024-12-18-10:01:43, LOG   , ut_console.c,   633 : 

2024-12-18-10:01:43, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile getInstance()'
2024-12-18-10:01:43, STEP  , ut_test_kvp_profile.c,   208 : Check ut_kvp_profile_getInstance() - Positive
2024-12-18-10:01:43, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile getInstance()'
2024-12-18-10:01:43, LOG   , ut_console.c,   633 : 

2024-12-18-10:01:43, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile close()'
2024-12-18-10:01:43, STEP  , ut_test_kvp_profile.c,   170 : test_ut_kvp_profile_close - start
2024-12-18-10:01:43, STEP  , ut_test_kvp_profile.c,   174 : test_ut_kvp_profile_close - end
2024-12-18-10:01:43, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile close()'

Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites      3      1    n/a      0        0
               tests     17      3      3      0        0
             asserts      2      2      2      0      n/a

Elapsed time =    0.002 seconds

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: q

2024-12-18-10:02:04, LOG   , ut_cunit.c,   177 : Logfile:[./logs/ut-log_2024-12-18_100133.log]
2024-12-18-10:02:04, LOG   , ut_cunit.c,   185 : ---- end of test run ----
jpn323@janus ~/workspace/gh78-ut-core/tests/build/bin (feature/gh78-multiple-profile-input-support-ut-core)$ 

@kanjoe24 kanjoe24 requested a review from Ulrond December 18, 2024 10:10
Copy link
Contributor

@Ulrond Ulrond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're testing for the wrong thing, from this level you need to check that -p is correcting operating by allowing two -p to be run.

therefore you need to write a test script that will provide that, and ensure the tests are passed

tests/src/c_source/ut_test_kvp_profile.c Outdated Show resolved Hide resolved
@kanjoe24
Copy link
Contributor Author

I think you're testing for the wrong thing, from this level you need to check that -p is correcting operating by allowing two -p to be run.

therefore you need to write a test script that will provide that, and ensure the tests are passed

Sure, A ticket has been raised to track this : #164

@kanjoe24
Copy link
Contributor Author

to demonstrate -p usage, please find the logs below:

./run.sh -p assets/config-test.yaml -p assets/include/depth_check.yaml 
Listing Filename:[/tmp/ut-log_2024-12-18_112626.log-Listing.xml]
Results Filename:[/tmp/ut-log_2024-12-18_112626.log]
Setting Log Path [./logs]
Listing Filename:[./logs/ut-log_2024-12-18_112626.log-Listing.xml]
Results Filename:[./logs/ut-log_2024-12-18_112626.log]
Using Profile[./assets/test_kvp.yaml]
Using Profile[assets/config-test.yaml]
Using Profile[assets/include/depth_check.yaml]

2024-12-18-11:26:26, LOG   , ut_cunit.c,   147 : ---- start of test run ----

ut-core: Wrapper framework for testing frameworks

***************** CUNIT CONSOLE - MAIN MENU ******************************
(R)un  (S)elect  (L)ist  (A)ctivate  (F)ailures  (O)ptions  (H)elp  (Q)uit
Enter command: s

--------------------- Registered Suites -----------------------------
#  Suite Name                                                       Init? Cleanup? #Tests Active?

1. ut-kvp - assert open / close                                      Yes      Yes      3     Yes
2. ut-kvp - assert testing yaml                                      Yes      Yes      7     Yes
3. ut-kvp - assert testing json                                      Yes      Yes      7     Yes
---------------------------------------------------------------------
Total Number of Suites : 3

Enter number of suite to select (1-3) : 1
Suite 'ut-kvp - assert open / close' selected.

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: s

----------------- Test List ------------------------------
Suite: ut-kvp - assert open / close

#  Test Name                          Active?

1. kvp profile open()                    Yes
2. kvp profile getInstance()             Yes
3. kvp profile close()                   Yes
----------------------------------------------------------
Total Number of Tests : 3

Enter number of test to select (1-3) : 1

2024-12-18-11:26:44, LOG   , ut_console.c,   633 : 

2024-12-18-11:26:44, LOG   , ut_console.c,   636 : Running Suite : ut-kvp - assert open / close
2024-12-18-11:26:44, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile open()'
2024-12-18-11:26:44, STEP  , ut_test_kvp_profile.c,   144 : test_ut_kvp_profile_open - start
2024-12-18-11:26:44, STEP  , ut_test_kvp_profile.c,   146 : ut_kvp_profile_open - assets/test_kvp.yaml---
decodeTest:
  checkUint8IsDeHex: 0xde
  checkUint8IsDeDec: 222
  checkUint16IsDeadHex: 0xdead
  checkUint16IsDeadDec: 57005
  checkUint32IsDeadBeefHex: 0xdeadbeef
  checkUint32IsDeadBeefDec: 3735928559
  checkUint64IsDeadBeefHex: 0xdeadbeefdeadbeef
  checkUint64IsDeadBeefDec: 16045690984833335023
  checkStringDeadBeef: "the beef is dead"
  checkStringDeadBeef2: the beef is also dead
  checkStringDeadBeefNoQuotes: the beef is dead
  checkBoolFalse: false
  checkBoolFALSE: FALSE
  checkBoolFaLse: FaLSE
  checkBoolTRUE: TRUE
  checkBooltrue: true
  checkBoolTRuE: TRuE
  checkStringList:
  - stringA
  - stringB
  - stringC
  - stringA
  - stringB
  - stringC
  checkUint32List:
  - 720
  - 800
  - 1080
  - 720
  - 800
  - 1080
profile: DUMMY_PROFILE
hal version: X.X.X
components:
- name: ComponentManager1
  interfaceVersion: X
  ResourceList1:
  - id: 0
    dummyCapabilities:
    - 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
  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
"1":
  value: true
"2":
  value: true
"3":
  value: true
"4":
  value: true
"5":
  value: true


2024-12-18-11:26:44, STEP  , ut_test_kvp_profile.c,   162 : test_ut_kvp_profile_open - end
2024-12-18-11:26:44, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile open()'

Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites      3      0    n/a      0        0
               tests     17      1      1      0        0
             asserts      0      0      0      0      n/a

Elapsed time =    0.001 seconds

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: q

2024-12-18-11:26:58, LOG   , ut_cunit.c,   177 : Logfile:[./logs/ut-log_2024-12-18_112626.log]
2024-12-18-11:26:58, LOG   , ut_cunit.c,   185 : ---- end of test run ----

@kanjoe24 kanjoe24 force-pushed the feature/gh78-multiple-profile-input-support-ut-core branch from 6fbe204 to 8bb0234 Compare December 19, 2024 14:18
@kanjoe24 kanjoe24 requested a review from Ulrond December 19, 2024 14:22
@kanjoe24 kanjoe24 force-pushed the feature/gh78-multiple-profile-input-support-ut-core branch from 0f446fa to 7c6796f Compare December 19, 2024 16:02
@kanjoe24
Copy link
Contributor Author

logs from ut-tests:

 ./run.sh 
Listing Filename:[/tmp/ut-log_2024-12-19_160137.log-Listing.xml]
Results Filename:[/tmp/ut-log_2024-12-19_160137.log]
Setting Log Path [./logs]
Listing Filename:[./logs/ut-log_2024-12-19_160137.log-Listing.xml]
Results Filename:[./logs/ut-log_2024-12-19_160137.log]
Using Profile[./assets/test_kvp.yaml]
Using Profile[assets/config-test.yaml]
Using Profile[assets/include/depth_check.yaml]

2024-12-19-16:01:37, LOG   , ut_cunit.c,   147 : ---- start of test run ----

 ut-core: Wrapper framework for testing frameworks

***************** CUNIT CONSOLE - MAIN MENU ******************************
(R)un  (S)elect  (L)ist  (A)ctivate  (F)ailures  (O)ptions  (H)elp  (Q)uit
Enter command: s

--------------------- Registered Suites -----------------------------
 #  Suite Name                                                       Init? Cleanup? #Tests Active?

 1. ut-kvp - assert open / close                                      Yes      Yes      3     Yes
 2. ut-kvp - assert testing yaml                                      Yes      Yes      7     Yes
 3. ut-kvp - assert testing json                                      Yes      Yes      7     Yes
---------------------------------------------------------------------
Total Number of Suites : 3

Enter number of suite to select (1-3) : 1
Suite 'ut-kvp - assert open / close' selected.

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: r

2024-12-19-16:01:49, LOG   , ut_console.c,   633 : 

2024-12-19-16:01:49, LOG   , ut_console.c,   636 : Running Suite : ut-kvp - assert open / close
2024-12-19-16:01:49, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile open()'
2024-12-19-16:01:49, STEP  , ut_test_kvp_profile.c,   144 : test_ut_kvp_profile_open - start
2024-12-19-16:01:49, STEP  , ut_test_kvp_profile.c,   146 : test_ut_kvp_profile_open - end
2024-12-19-16:01:49, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile open()'
2024-12-19-16:01:49, LOG   , ut_console.c,   633 : 

2024-12-19-16:01:49, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile getInstance()'
2024-12-19-16:01:49, STEP  , ut_test_kvp_profile.c,   189 : Check ut_kvp_profile_getInstance() - Positive
2024-12-19-16:01:49, STEP  , ut_test_kvp_profile.c,   193 : Tested for profile : assets/test_kvp.yaml
2024-12-19-16:01:49, STEP  , ut_test_kvp_profile.c,   200 : Tested for profile : assets/config-test.yaml
2024-12-19-16:01:49, STEP  , ut_test_kvp_profile.c,   207 : Tested for profile : assets/include/depth_check.yaml
2024-12-19-16:01:49, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile getInstance()'
2024-12-19-16:01:49, LOG   , ut_console.c,   633 : 

2024-12-19-16:01:49, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile close()'
2024-12-19-16:01:49, STEP  , ut_test_kvp_profile.c,   151 : test_ut_kvp_profile_close - start
2024-12-19-16:01:49, STEP  , ut_test_kvp_profile.c,   155 : test_ut_kvp_profile_close - end
2024-12-19-16:01:49, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile close()'

Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites      3      1    n/a      0        0
               tests     17      3      3      0        0
             asserts      4      4      4      0      n/a

Elapsed time =    0.001 seconds

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: q

2024-12-19-16:01:57, LOG   , ut_cunit.c,   177 : Logfile:[./logs/ut-log_2024-12-19_160137.log]
2024-12-19-16:01:57, LOG   , ut_cunit.c,   185 : ---- end of test run ----

@kanjoe24 kanjoe24 force-pushed the feature/gh78-multiple-profile-input-support-ut-core branch from 7c6796f to 1dab2a5 Compare December 19, 2024 16:10
@kanjoe24
Copy link
Contributor Author

kanjoe24 commented Dec 19, 2024

logs from ut-test, when 1 of the profile used in the test was not supplied

./run.sh 
Listing Filename:[/tmp/ut-log_2024-12-19_161153.log-Listing.xml]
Results Filename:[/tmp/ut-log_2024-12-19_161153.log]
Setting Log Path [./logs]
Listing Filename:[./logs/ut-log_2024-12-19_161153.log-Listing.xml]
Results Filename:[./logs/ut-log_2024-12-19_161153.log]
Using Profile[./assets/test_kvp.yaml]
Using Profile[assets/include/depth_check.yaml]

2024-12-19-16:11:53, LOG   , ut_cunit.c,   147 : ---- start of test run ----

 ut-core: Wrapper framework for testing frameworks

***************** CUNIT CONSOLE - MAIN MENU ******************************
(R)un  (S)elect  (L)ist  (A)ctivate  (F)ailures  (O)ptions  (H)elp  (Q)uit
Enter command: s

--------------------- Registered Suites -----------------------------
 #  Suite Name                                                       Init? Cleanup? #Tests Active?

 1. ut-kvp - assert open / close                                      Yes      Yes      3     Yes
 2. ut-kvp - assert testing yaml                                      Yes      Yes      7     Yes
 3. ut-kvp - assert testing json                                      Yes      Yes      7     Yes
---------------------------------------------------------------------
Total Number of Suites : 3

Enter number of suite to select (1-3) : 1
Suite 'ut-kvp - assert open / close' selected.

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: r

2024-12-19-16:11:57, LOG   , ut_console.c,   633 : 

2024-12-19-16:11:57, LOG   , ut_console.c,   636 : Running Suite : ut-kvp - assert open / close
2024-12-19-16:11:57, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile open()'
2024-12-19-16:11:57, STEP  , ut_test_kvp_profile.c,   144 : test_ut_kvp_profile_open - start
2024-12-19-16:11:57, STEP  , ut_test_kvp_profile.c,   146 : test_ut_kvp_profile_open - end
2024-12-19-16:11:57, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile open()'
2024-12-19-16:11:57, LOG   , ut_console.c,   633 : 

2024-12-19-16:11:57, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile getInstance()'
2024-12-19-16:11:57, STEP  , ut_test_kvp_profile.c,   191 : Check ut_kvp_profile_getInstance() - Positive
2024-12-19-16:11:57, STEP  , ut_test_kvp_profile.c,   195 : Tested for profile : assets/test_kvp.yaml
2024-12-19-16:11:57, ERROR , ut_kvp.c,   271 : Parsing Error
2024-12-19-16:11:57, ASSERT  , ut_test_kvp_profile.c,   197 : UT_ASSERT:"resultP1 == true"
2024-12-19-16:11:57, ERROR , ut_test_kvp_profile.c,   200 : perhaps platform profile(assets/config-test.yaml) was not passed using -p switch
2024-12-19-16:11:57, STEP  , ut_test_kvp_profile.c,   202 : Tested for profile : assets/config-test.yaml
2024-12-19-16:11:57, STEP  , ut_test_kvp_profile.c,   209 : Tested for profile : assets/include/depth_check.yaml
2024-12-19-16:11:57, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile getInstance()'
2024-12-19-16:11:57, LOG   , ut_console.c,   633 : 

2024-12-19-16:11:57, LOG   , ut_console.c,   639 :      Running Test : 'kvp profile close()'
2024-12-19-16:11:57, STEP  , ut_test_kvp_profile.c,   151 : test_ut_kvp_profile_close - start
2024-12-19-16:11:57, STEP  , ut_test_kvp_profile.c,   155 : test_ut_kvp_profile_close - end
2024-12-19-16:11:57, LOG   , ut_console.c,   661 :      Test Complete : 'kvp profile close()'

Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites      3      1    n/a      0        0
               tests     17      3      2      1        0
             asserts      4      4      3      1      n/a

Elapsed time =    0.002 seconds

***************** CUNIT CONSOLE - SUITE MENU ***************************
(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit
Enter command: q

2024-12-19-16:12:38, LOG   , ut_cunit.c,   177 : Logfile:[./logs/ut-log_2024-12-19_161153.log]
2024-12-19-16:12:38, LOG   , ut_cunit.c,   185 : ---- end of test run ----
jpn323@janus ~/workspace/gh78-ut-core/tests/build/bin (feature/gh78-multiple-profile-input-support-ut-core)$ cat run.sh 
#!/bin/bash

# *
# * If not stated otherwise in this file or this component's LICENSE file the
# * following copyright and licenses apply:
# *
# * Copyright 2023 RDK Management
# *
# * Licensed under the Apache License, Version 2.0 (the "License");
# * you may not use this file except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *

set -e # error out if required
SCRIPT_EXEC="$(realpath $0)"
MY_DIR="$(dirname $SCRIPT_EXEC)"

cd "$(dirname "$0")"
mkdir -p ./logs

export LD_LIBRARY_PATH=/usr/lib:/lib:/home/root:${MY_DIR}

#./ut-test -l ./logs -p ./assets/test_kvp.yaml -p assets/config-test.yaml -p assets/include/depth_check.yaml $@
./ut-test -l ./logs -p ./assets/test_kvp.yaml -p assets/include/depth_check.yaml $@

@kanjoe24 kanjoe24 requested a review from Ulrond December 19, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Under Review
Development

Successfully merging this pull request may close these issues.

i78: ut-core: upgrade core to support multiple profile inputs that get merged into a single lookup
2 participants