Skip to content

ts: cvtest::debugLevel / --test_debug=<N> option#18955

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
alalek:test_debug_flag
Dec 4, 2020
Merged

ts: cvtest::debugLevel / --test_debug=<N> option#18955
opencv-pushbot merged 1 commit intoopencv:3.4from
alalek:test_debug_flag

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Nov 28, 2020

OpenCV tests should not write any test results by default.

However sometimes it is useful to collect extra information for problem investigation (test failure).

  • on devices/configurations without properly configured debugger
  • on devices where compilation is not available (cross-compilation case) to modify test code or replace #if 0

Available options:

  • --test_debug / --test_debug=N
  • OPENCV_TEST_DEBUG environment variable
  • variable cvtest::debugLevel

Note: Use debug mode for "debugging" single test case only. There is no requirement for unique filenames (result.png / test.png is a common practice).

Note: Use imshow() for debug levels >= 10 (to avoid test crashes due to lack of UI backend).

@asmorkalov asmorkalov self-requested a review November 30, 2020 09:05
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

Cool solution! 💯

@asmorkalov asmorkalov self-assigned this Dec 2, 2020
@asmorkalov
Copy link
Copy Markdown
Contributor

@alalek are there any open items before merge?

@opencv-pushbot opencv-pushbot merged commit 12a36b5 into opencv:3.4 Dec 4, 2020
@alalek alalek mentioned this pull request Dec 4, 2020
@alalek alalek mentioned this pull request Apr 9, 2021
@alalek alalek mentioned this pull request Nov 25, 2021
6 tasks
@alalek alalek mentioned this pull request Feb 16, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants