Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
5ae9add1
Commit
5ae9add1
authored
Jan 29, 2014
by
Roman Donchenko
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2221 from asmorkalov:ocv_test_install_custom
parents
3e59ddba
d45350a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
4 deletions
+38
-4
CMakeLists.txt
CMakeLists.txt
+11
-2
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+2
-2
opencv_run_all_tests.sh.in
cmake/templates/opencv_run_all_tests.sh.in
+25
-0
No files found.
CMakeLists.txt
View file @
5ae9add1
...
...
@@ -275,6 +275,9 @@ endif()
set
(
OPENCV_SAMPLES_BIN_INSTALL_PATH
"
${
OpenCV_INSTALL_BINARIES_PREFIX
}
samples"
)
set
(
OPENCV_BIN_INSTALL_PATH
"
${
OpenCV_INSTALL_BINARIES_PREFIX
}
bin"
)
if
(
NOT OPENCV_TEST_INSTALL_PATH
)
set
(
OPENCV_TEST_INSTALL_PATH
"
${
OPENCV_BIN_INSTALL_PATH
}
"
)
endif
()
if
(
ANDROID
)
set
(
LIBRARY_OUTPUT_PATH
"
${
OpenCV_BINARY_DIR
}
/lib/
${
ANDROID_NDK_ABI_NAME
}
"
)
...
...
@@ -564,8 +567,14 @@ include(cmake/OpenCVGenInfoPlist.cmake)
# Generate environment setup file
if
(
INSTALL_TESTS AND OPENCV_TEST_DATA_PATH AND UNIX AND NOT ANDROID
)
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/templates/opencv_testing.sh.in"
"
${
CMAKE_BINARY_DIR
}
/unix-install/opencv_testing.sh"
@ONLY IMMEDIATE
)
install
(
FILES
"
${
CMAKE_BINARY_DIR
}
/unix-install/opencv_testing.sh"
DESTINATION /etc/profile.d/ COMPONENT tests
)
"
${
CMAKE_BINARY_DIR
}
/unix-install/opencv_testing.sh"
@ONLY
)
install
(
FILES
"
${
CMAKE_BINARY_DIR
}
/unix-install/opencv_testing.sh"
DESTINATION /etc/profile.d/ COMPONENT tests
)
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/templates/opencv_run_all_tests.sh.in"
"
${
CMAKE_BINARY_DIR
}
/unix-install/opencv_run_all_tests.sh"
@ONLY
)
install
(
FILES
"
${
CMAKE_BINARY_DIR
}
/unix-install/opencv_run_all_tests.sh"
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE
DESTINATION
${
OPENCV_TEST_INSTALL_PATH
}
COMPONENT tests
)
endif
()
# ----------------------------------------------------------------------------
...
...
cmake/OpenCVModule.cmake
View file @
5ae9add1
...
...
@@ -712,7 +712,7 @@ function(ocv_add_perf_tests)
# TODO: warn about unsatisfied dependencies
endif
(
OCV_DEPENDENCIES_FOUND
)
if
(
INSTALL_TESTS
)
install
(
TARGETS
${
the_target
}
RUNTIME DESTINATION
${
OPENCV_
BIN
_INSTALL_PATH
}
COMPONENT tests
)
install
(
TARGETS
${
the_target
}
RUNTIME DESTINATION
${
OPENCV_
TEST
_INSTALL_PATH
}
COMPONENT tests
)
endif
()
endif
()
endfunction
()
...
...
@@ -769,7 +769,7 @@ function(ocv_add_accuracy_tests)
endif
(
OCV_DEPENDENCIES_FOUND
)
if
(
INSTALL_TESTS
)
install
(
TARGETS
${
the_target
}
RUNTIME DESTINATION
${
OPENCV_
BIN
_INSTALL_PATH
}
COMPONENT tests
)
install
(
TARGETS
${
the_target
}
RUNTIME DESTINATION
${
OPENCV_
TEST
_INSTALL_PATH
}
COMPONENT tests
)
endif
()
endif
()
endfunction
()
...
...
cmake/templates/opencv_run_all_tests.sh.in
0 → 100644
View file @
5ae9add1
#!/bin/sh
OPENCV_TEST_PATH
=
@OPENCV_TEST_INSTALL_PATH@
export
OPENCV_TEST_DATA_PATH
=
@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata
SUMMARY_STATUS
=
0
for
t
in
"
$OPENCV_TEST_PATH
/"
opencv_test_
*
"
$OPENCV_TEST_PATH
/"
opencv_perf_
*
;
do
"
$t
"
--perf_min_samples
=
1
--perf_force_samples
=
1
--gtest_output
=
xml:
$t
-
`
date
--rfc-3339
=
date
`
.xml
TEST_STATUS
=
$?
if
[
$TEST_STATUS
-ne
0
]
;
then
SUMMARY_STATUS
=
$TEST_STATUS
fi
done
rm
-f
/tmp/__opencv_temp.
*
if
[
$SUMMARY_STATUS
-eq
0
]
;
then
echo
"All OpenCV tests finished successfully"
else
echo
"OpenCV tests finished with status
$SUMMARY_STATUS
"
fi
return
$SUMMARY_STATUS
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment