First time here? Check out the FAQ!

Ask Your Question
2

add a new test file to OpenCV source

asked Jul 23 '13

mat_pier gravatar image

I'm trying to contribute to the source code. I have written a new feature. It got compiled properly and is working as expected (after I run make; sudo make install).

I wrote a test file in opencv/modules/module_name/test/test_abc.cpp

I also enabled BUILD_TESTS before running make.

However, when I run make the new test file doesn't get included.

What am I missing? Where do I tweak settings so that the my test file is included?

Preview: (hide)

Comments

is that a new module ? e.g core/cmakefile.txt has a line : ocv_add_accuracy_tests()

without args, it should add the contents of the module's test folder (*.hpp *.cpp)

it's defined in opencv/cmake/OpenCVModule.cmake, L665

berak gravatar imageberak (Jul 23 '13)edit

1 answer

Sort by » oldest newest most voted
2

answered Jul 23 '13

Vladislav Vinogradov gravatar image

Each time you add new file you need to rerun CMake. CMake will add the file to build rule.

Preview: (hide)

Question Tools

Stats

Asked: Jul 23 '13

Seen: 195 times

Last updated: Jul 22 '13