X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test.sh;h=7faf456b873ec3f33bcbb5ba2aafa9d7ed94797d;hb=18e1dd362d39f72fe4e9437226e5d0f29fb9379d;hp=96464a28689a4ec5684131c49747cc3d3b7cc192;hpb=9470562ef5398c36a71ac1b9ee837ddf224ec6da;p=modules%2Fshaper.git diff --git a/test.sh b/test.sh index 96464a286..7faf456b8 100755 --- a/test.sh +++ b/test.sh @@ -1,25 +1,21 @@ #!/bin/bash -# Find absolute path to ROOT_DIR -export ROOT_DIR=$(pwd)/.. -export ROOT_DIR=`cd "${ROOT_DIR}";pwd` +source env.sh -SRC_DIR=${ROOT_DIR}/sources +mkdir -p ${BUILD_DIR} +cd ${BUILD_DIR} -BUILD_DIR=build -INSTALL_DIR=install -if [ $1 ]; then - BUILD_DIR=${BUILD_DIR}-$1 - INSTALL_DIR=${INSTALL_DIR}-$1 -fi - -source ${SRC_DIR}/salome_env.sh -source ${SRC_DIR}/linux_env.sh $1 -mkdir -p ${ROOT_DIR}/${BUILD_DIR} -cd ${ROOT_DIR}/${BUILD_DIR} +export DISPLAY="localhost:0.0" -CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release" -CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${ROOT_DIR}/${INSTALL_DIR}" -CMAKE_ARGS="${CMAKE_ARGS} ${SRC_DIR}" +# check for __init__.py in the SHAPER's Python scripts directory +# for correct parsing PYTHONPATH and use the actual version of SHAPER +# instead of distributed with SALOME +if [[ ! -f ${SHAPER_PYTHON_SCRIPTS_DIR}/salome/__init__.py ]]; then + touch ${SHAPER_PYTHON_SCRIPTS_DIR}/salome/__init__.py +fi -ctest --no-compress-output -T Test +if [[ $# > 0 ]]; then + ctest --no-compress-output -T Test "$@" -R $1 +else + ctest --no-compress-output -T Test "$@" +fi