Skip to content

Commit

Permalink
check that current directory has write access
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladislav Vinogradov committed May 19, 2015
1 parent b9792fd commit 0550b2c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmake/templates/opencv_run_all_tests_unix.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ 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

CUR_DIR=`pwd`
if [ -d "$CUR_DIR" -a -w "$CUR_DIR" ]; then
echo "${TEXT_CYAN}CUR_DIR : $CUR_DIR${TEXT_RESET}"
else
echo "${TEXT_RED}Error: Do not have permissions to write to $CUR_DIR${TEXT_RESET}"
echo "${TEXT_RED}Please run the script from directory with write access${TEXT_RESET}"
exit 1
fi

# Run tests

SUMMARY_STATUS=0
Expand Down

0 comments on commit 0550b2c

Please sign in to comment.