mirror of https://github.com/opencv/opencv.git
commit
4ce31c7c1a
57 changed files with 323886 additions and 359891 deletions
@ -0,0 +1,4 @@ |
||||
@CHANGELOG_PACKAGE_NAME@ (@CPACK_PACKAGE_VERSION@) unstable; urgency=low |
||||
* Debian changelog stub. See upstream changelog or release notes in user |
||||
documentation for more details. |
||||
-- @CPACK_PACKAGE_CONTACT@ @CHANGELOG_PACKAGE_DATE@ |
@ -1,36 +1,142 @@ |
||||
#!/bin/sh |
||||
#!/bin/bash |
||||
|
||||
# Usage info |
||||
|
||||
usage() |
||||
{ |
||||
cat << EOF |
||||
usage: $0 [options] |
||||
|
||||
This script runs the OpenCV tests on linux device. |
||||
|
||||
OPTIONS: |
||||
-h Show this message |
||||
-c Color output |
||||
EOF |
||||
} |
||||
|
||||
# Parse options |
||||
|
||||
COLOR_OUTPUT=0 |
||||
while getopts “hc” OPTION |
||||
do |
||||
case $OPTION in |
||||
h) |
||||
usage |
||||
exit 0 |
||||
;; |
||||
c) |
||||
COLOR_OUTPUT=1 |
||||
;; |
||||
?) |
||||
usage |
||||
exit 1 |
||||
;; |
||||
esac |
||||
done |
||||
|
||||
# Text style |
||||
|
||||
if [ $COLOR_OUTPUT -eq 1 ]; then |
||||
TEXT_RED="$(tput setaf 1)" |
||||
TEXT_GREEN="$(tput setaf 2)" |
||||
TEXT_CYAN="$(tput setaf 6)" |
||||
TEXT_RESET="$(tput sgr0)" |
||||
else |
||||
TEXT_RED="" |
||||
TEXT_GREEN="" |
||||
TEXT_CYAN="" |
||||
TEXT_RESET="" |
||||
fi |
||||
|
||||
# Test binaries and data paths |
||||
|
||||
OPENCV_TEST_PATH=@CMAKE_INSTALL_PREFIX@/@OPENCV_TEST_INSTALL_PATH@ |
||||
OPENCV_PYTHON_TESTS=@OPENCV_PYTHON_TESTS_LIST@ |
||||
export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata |
||||
|
||||
# Run tests |
||||
|
||||
SUMMARY_STATUS=0 |
||||
FAILED_TESTS="" |
||||
PASSED_TESTS="" |
||||
|
||||
for t in "$OPENCV_TEST_PATH/"opencv_test_* "$OPENCV_TEST_PATH/"opencv_perf_*; |
||||
do |
||||
report="`basename "$t"`-`date --rfc-3339=date`.xml" |
||||
"$t" --perf_min_samples=1 --perf_force_samples=1 --gtest_output=xml:"$report" |
||||
TEST_STATUS=$? |
||||
if [ $TEST_STATUS -ne 0 ]; then |
||||
SUMMARY_STATUS=$TEST_STATUS |
||||
fi |
||||
test_name=`basename "$t"` |
||||
report="$test_name-`date --rfc-3339=date`.xml" |
||||
|
||||
cmd="$t --perf_min_samples=1 --perf_force_samples=1 --gtest_output=xml:\"$report\"" |
||||
|
||||
seg_reg="s/^/${TEXT_CYAN}[$test_name]${TEXT_RESET} /" # append test name |
||||
if [ $COLOR_OUTPUT -eq 1 ]; then |
||||
seg_reg="${seg_reg};s/\[==========\]/${TEXT_GREEN}&${TEXT_RESET}/g" # green for [==========] |
||||
seg_reg="${seg_reg};s/\[----------\]/${TEXT_GREEN}&${TEXT_RESET}/g" # green for [----------] |
||||
seg_reg="${seg_reg};s/\[ RUN \]/${TEXT_GREEN}&${TEXT_RESET}/g" # green for [ RUN ] |
||||
seg_reg="${seg_reg};s/\[ OK \]/${TEXT_GREEN}&${TEXT_RESET}/g" # green for [ OK ] |
||||
seg_reg="${seg_reg};s/\[ FAILED \]/${TEXT_RED}&${TEXT_RESET}/g" # red for [ FAILED ] |
||||
seg_reg="${seg_reg};s/\[ PASSED \]/${TEXT_GREEN}&${TEXT_RESET}/g" # green for [ PASSED ] |
||||
fi |
||||
|
||||
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} RUN : $cmd" |
||||
$cmd | sed -r "$seg_reg" |
||||
ret=${PIPESTATUS[0]} |
||||
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} RETURN_CODE : $ret" |
||||
|
||||
if [ $ret -ne 0 ]; then |
||||
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} ${TEXT_RED}FAILED${TEXT_RESET}" |
||||
SUMMARY_STATUS=1 |
||||
FAILED_TESTS="$FAILED_TESTS $test_name" |
||||
else |
||||
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} ${TEXT_GREEN}OK${TEXT_RESET}" |
||||
PASSED_TESTS="$PASSED_TESTS $test_name" |
||||
fi |
||||
|
||||
echo "" |
||||
done |
||||
|
||||
for t in $OPENCV_PYTHON_TESTS; |
||||
do |
||||
report="`basename "$t"`-`date --rfc-3339=date`.xml" |
||||
py.test --junitxml $report "$OPENCV_TEST_PATH"/$t |
||||
TEST_STATUS=$? |
||||
if [ $TEST_STATUS -ne 0 ]; then |
||||
SUMMARY_STATUS=$TEST_STATUS |
||||
fi |
||||
test_name=`basename "$t"` |
||||
report="$test_name-`date --rfc-3339=date`.xml" |
||||
|
||||
cmd="py.test --junitxml $report \"$OPENCV_TEST_PATH\"/$t" |
||||
|
||||
seg_reg="s/^/${TEXT_CYAN}[$test_name]${TEXT_RESET} /" # append test name |
||||
|
||||
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} RUN : $cmd" |
||||
eval "$cmd" | sed -r "$seg_reg" |
||||
|
||||
ret=${PIPESTATUS[0]} |
||||
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} RETURN_CODE : $ret" |
||||
|
||||
if [ $ret -ne 0 ]; then |
||||
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} ${TEXT_RED}FAILED${TEXT_RESET}" |
||||
SUMMARY_STATUS=1 |
||||
FAILED_TESTS="$FAILED_TESTS $test_name" |
||||
else |
||||
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} ${TEXT_GREEN}OK${TEXT_RESET}" |
||||
PASSED_TESTS="$PASSED_TESTS $test_name" |
||||
fi |
||||
|
||||
echo "" |
||||
done |
||||
|
||||
# Remove temporary test files |
||||
|
||||
rm -f /tmp/__opencv_temp.* |
||||
|
||||
# Report final status |
||||
|
||||
echo "${TEXT_CYAN}===============================================================${TEXT_RESET}" |
||||
echo "${TEXT_CYAN}PASSED TESTS : $PASSED_TESTS${TEXT_RESET}" |
||||
echo "${TEXT_CYAN}FAILED TESTS : $FAILED_TESTS${TEXT_RESET}" |
||||
if [ $SUMMARY_STATUS -eq 0 ]; then |
||||
echo "All OpenCV tests finished successfully" |
||||
echo "${TEXT_GREEN}STATUS : OK${TEXT_RESET}" |
||||
echo "${TEXT_GREEN}STATUS : All OpenCV tests finished successfully${TEXT_RESET}" |
||||
else |
||||
echo "OpenCV tests finished with status $SUMMARY_STATUS" |
||||
echo "${TEXT_RED}STATUS : FAIL${TEXT_RESET}" |
||||
echo "${TEXT_RED}STATUS : OpenCV tests finished with status $SUMMARY_STATUS${TEXT_RESET}" |
||||
fi |
||||
|
||||
return $SUMMARY_STATUS |
||||
exit $SUMMARY_STATUS |
||||
|
@ -1,2 +0,0 @@ |
||||
# Environment setup for OpenCV testing |
||||
export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,43 @@ |
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// * The name of the copyright holders may not be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// This software is provided by the copyright holders and contributors "as is" and
|
||||
// any express or implied warranties, including, but not limited to, the implied
|
||||
// warranties of merchantability and fitness for a particular purpose are disclaimed.
|
||||
// In no event shall the Intel Corporation or contributors be liable for any direct,
|
||||
// indirect, incidental, special, exemplary, or consequential damages
|
||||
// (including, but not limited to, procurement of substitute goods or services;
|
||||
// loss of use, data, or profits; or business interruption) however caused
|
||||
// and on any theory of liability, whether in contract, strict liability,
|
||||
// or tort (including negligence or otherwise) arising in any way out of
|
||||
// the use of this software, even if advised of the possibility of such damage.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#include "opencv2/ts/ts.hpp" |
@ -1 +1 @@ |
||||
See http://opencv.org/android |
||||
See http://opencv.org/platforms/android.html |
||||
|
Loading…
Reference in new issue