X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test.sh;h=7faf456b873ec3f33bcbb5ba2aafa9d7ed94797d;hb=46c384fb088c97355cb1266cc29bd9429bfa342f;hp=ec98d256ed825dfedc38d5eaede2aef7b03a948b;hpb=fcaaac822cabb51cb820ee0b387eb0542ffbe4b3;p=modules%2Fshaper.git diff --git a/test.sh b/test.sh index ec98d256e..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 +if [[ $# > 0 ]]; then + ctest --no-compress-output -T Test "$@" -R $1 +else + ctest --no-compress-output -T Test "$@" +fi