Skip to content

Conversation

@Abhishek-0412
Copy link

@Abhishek-0412 Abhishek-0412 commented Apr 18, 2025

Enhance ut-core framework to print testcases properly

Test case width is hardcoded to a 34 in ut-core framework.

If the testcase name is greater than 34 , while displaying testcase name in console its truncated.

In later version of ut-core, 34 is changed to UT_MAX_LENGTH_TEST_NAME_DISPLAYED (64) , which is not an ideal solution.
d5b15c7

Handled using dynamic approach by allocating the width by parsing through all the testcase names and setting width to maxTestNameLength.

https://jira.rdkcentral.com/jira/browse/TDK-10019

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@kanjoe24 kanjoe24 requested a review from Ulrond April 18, 2025 20:18
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.

please raise a ticket on ut-core, describe the problem that you're trying to solve by raising an issue on the git repo, and then branch the code..

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.

we extended the size to ensure that we handle the extended name sizes because the autogenerated code generally had larger names, but we wanted also to ensure that it was visible across both C & C++.

We also want engineers to enure that they do not make functions names > that the actual fixed size, it's important to ensure they do not for both C & C++.

Therefore, the design and the of fixed spacing and truncated names is the design and the current requirement.

What problem you're actually trying to solve here? Do you have function names > 64 characters?

@github-project-automation github-project-automation bot moved this from Todo to Changes Requested in UT-Core Roadmap Apr 22, 2025
@kanjoe24
Copy link
Contributor

Screenshot 2025-04-22 at 11 46 53

Hi @Abhishek-0412, We tried your changes and had a look at it visually.
The screenshot here shows your changes on right and current ut-core on left. With dynamic changes that you brought in, the consistency of the test display is lost. Please have a look.
We felt the left one is better. Do let us know, your opinion on the same.

Thanks

cc : @Ulrond

@Abhishek-0412
Copy link
Author

I understand the intent behind maintaining a fixed width layout in the console logs, My initial concern was primarily around truncated function names, which can make it hard to quickly identify failing test cases, If we are standardizing on keeping function names within a 64-character limit as a coding guideline, I am completely ok with that approach. It addresses the concern without changing the console display logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Changes Requested

Development

Successfully merging this pull request may close these issues.

4 participants