Skip to content

ts: support test tags#12783

Merged
opencv-pushbot merged 2 commits intoopencv:3.4from
alalek:test_tag
Apr 12, 2019
Merged

ts: support test tags#12783
opencv-pushbot merged 2 commits intoopencv:3.4from
alalek:test_tag

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Oct 9, 2018

--gtest_filter is not enough for flexible tests filtering on multiple platforms in multiple configurations: 32-bit / debug / valgrind / coverage / etc.

resolves #12710
related #12502 #11523

Patch includes:

  • added functionality to collect memory usage of OpenCL sybsystem
  • memory usage of fastMalloc() (disabled by default):
    • It is not accurate sometimes - external memory profiler is required.
  • specify common CV_TEST_TAG_ macros
  • added applyTestTag() function
  • write memory usage / enabled tags into Google Tests output file (.xml)

TODO:

  • apply infrastructure changes, flags
  • add tags for perf_dnn
  • add implementation for --test_tag_file
  • update BIGDATA test implementation
force_builders=linux32,win32
buildworker:Linux x64 Debug=linux-1
allow_multiple_commits=1

// [all | test_tag] - (test_tag_skip - test_tag_enable) + test_tag_force

#define CV_TEST_TAGS_PARAMS \
"{ test_tag | |run tests with specified 'tag' markers only (comma ',' separated list) }" \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Aren't there too many controlling options? I believe one or two should be enough for most usecases:

--test_tag_filter=* # default value - all tests enabled
--test_tag_filter=*:-type_64f:size_4k # disable some tags
--test_tag_filter=type_64f:size_4k # enable only specific tags

I also think that we should not disable any tags by default (e.g. 2Gb test on 32-bit platforms). It's up to end user to determine platform limitations and choose appropriate test case set.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It is due its "default values" for different parameters. Automatic disabling of 2Gb+ (plus mean "more") on 32-bit platforms is useful feature.

It's up to end user to determine platform limitations and choose appropriate test case set.

--gtest_filter can specify tests cases set too. Idea of this proposal to make it flexible.

Implied tags:

  • mem_6gb implies mem_2gb, mem_1gb, mem_512Mb, ...
  • verylong test implies long test tag too
  • size_fullhd implies size_hd
  • see applyTestTagImpl() builtins

I don't like gtest filter format - it is not friendly for simple appending (need to parse first on positive and negative parts).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As I can see implied/direct tags distinction is needed only for printing. We can simplify code greatly if there would be no such separation and all implied tags would be printed too. We could store tags in single std::set or std::map.

Can the default tag filter be set in CommandLineParser?

# no parameter - default values, e.g. mem_2gb
--skip_tags=mem_6gb,verylong # override default values
--skip_tags=none,mem_6gb # override default values, 'none' matches non-tagged tests

alalek and others added 2 commits April 8, 2019 19:12
- added functionality to collect memory usage of OpenCL sybsystem
- memory usage of fastMalloc() (disabled by default):
  * It is not accurate sometimes - external memory profiler is required.
- specify common `CV_TEST_TAG_` macros
- added applyTestTag() function
- write memory usage / enabled tags into Google Tests output file (.xml)
@alalek
Copy link
Copy Markdown
Member Author

alalek commented Apr 12, 2019

👍

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