8000 CMake: make OPENCV_TEST_DATA_PATH cached, add warning if tests are built by zteffi · Pull Request #18703 · opencv/opencv · GitHub
[go: up one dir, main page]

Skip to content

CMake: make OPENCV_TEST_DATA_PATH cached, add warning if tests are built #18703

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

Closed
wants to merge 1 commit into from

Conversation

zteffi
Copy link
Contributor
@zteffi zteffi commented Oct 30, 2020

Add warning if INSTALL_TESTS is ON but OPENCV_TEST_DATA_PATH is not set

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • The PR is proposed to proper branch

I propose setting OPENCV_TEST_DATA_PATH as cached variable, with docstring hinting to the required path as well as a status message warning users some tests will fail unless they set the variable when INSTALL_TESTS is on. This should alleviate the confusion between OPENCV_EXTRA_MODULES_PATH pointing to opencv_contrib/modules and OPENCV_TEST_DATA_PATH pointing to opencv_extra/testdata, mentioned in #18610

Add warning if INSTALL_TESTS is ON but OPENCV_TEST_DATA_PATH is not set
@alalek
Copy link
Member
alalek commented Oct 30, 2020

This CMake variable is used for testdata installation, but it is not necessary and optional step.
Primary source for value for OPENCV_TEST_DATA_PATH is environment variable which is used by OpenCV tests (not a CMake or similar, only some script tries to propagate them - but we don't use such scripts).
Installation of testdata still requires to configure OPENCV_TEST_DATA_PATH environment variable to run tests. So warning looks useless and confuses users too.

Also INSTALL_TESTS != INSTALL_TEST_DATA.

Also it is not necessary to install anything to run OpenCV application or tests. You just don't need to build "install" target.


Again, OPENCV_EXTRA_MODULES_PATH is not limited to "opencv_contrib" modules only. It may accept any OpenCV modules outside of main tree from any repository.

@mshabunin
Copy link
Contributor

BTW, current test data size is ~475 Mb (packed) and full install package with tests is ~50 Mb (Linux, packed).

@asmorkalov
Copy link
Contributor

The dev team (@alalek @vpisarev @vladimir-dudnik @asmorkalov) decided to not merge the patch anc close the PR.

@asmorkalov asmorkalov closed this Nov 16, 2020
@zteffi zteffi deleted the missing-testdata-folder-warning branch November 16, 2020 20:22
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.

4 participants
0