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

test/cli/test-other.py: Fix test_showtime_top5_file. #5847

Merged
merged 1 commit into from
Jan 6, 2024

Commits on Jan 6, 2024

  1. test/cli/test-other.py: Fix test_showtime_top5_file.

    test_showtime_top5_file() assumes that all reported elements, of which the "top
    5" are validated, end with the string "- 1 result(s))".
    
    This is clearly not the case when viewing the entire list:
    
    ```bash
    $ cppcheck --showtime=summary --quiet empty.c  |grep "2 result"
    valueFlowLifetime(tokenlist, errorLogger, settings): 3.4e-05s (avg. 1.7e-05s - 2 result(s))
    valueFlowEnumValue(symboldatabase, settings): 3e-06s (avg. 1.5e-06s - 2 result(s))
    ```
    
    As the order of items is non-deterministic, this test makes CI workflows
    randomly fail.
    
    This patch addresses the issue by adjusting the expected string to the reported
    item.
    mvds00 committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    4c07fb4 View commit details
    Browse the repository at this point in the history