2014-01-29 09:01:06 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2014-02-06 09:35:14 +01:00
|
|
|
OPENCV_TEST_PATH=@CMAKE_INSTALL_PREFIX@/@OPENCV_TEST_INSTALL_PATH@
|
2014-09-08 16:11:12 +02:00
|
|
|
OPENCV_PYTHON_TESTS=@OPENCV_PYTHON_TESTS_LIST@
|
2014-01-29 09:01:06 +01:00
|
|
|
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
|
2014-01-31 07:47:01 +01:00
|
|
|
report="`basename "$t"`-`date --rfc-3339=date`.xml"
|
|
|
|
"$t" --perf_min_samples=1 --perf_force_samples=1 --gtest_output=xml:"$report"
|
2014-01-29 09:01:06 +01:00
|
|
|
TEST_STATUS=$?
|
|
|
|
if [ $TEST_STATUS -ne 0 ]; then
|
|
|
|
SUMMARY_STATUS=$TEST_STATUS
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2014-09-08 16:11:12 +02:00
|
|
|
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
|
|
|
|
done
|
|
|
|
|
2014-01-29 09:01:06 +01:00
|
|
|
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
|