added Scripts/test.sh (#2243)

* added Scripts/test.sh

* added optional build dir parameter
This commit is contained in:
Francois Berenger
2019-03-22 23:58:29 +09:00
committed by Greg Landrum
parent 6558905b73
commit 645642a9f5

22
Scripts/test.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
#set -x # DEBUG
# launch the unit tests suite.
# run this script like this: ./Scripts/test.sh [build_dir]
# if no build_dir is specified, ./build is assumed to be the default
# build directory
build_dir="build"
if [ "$#" -eq 1 ]; then
build_dir=$1
fi
RDBASE=$PWD
PYTHONPATH=$RDBASE
LD_LIBRARY_PATH=$RDBASE/lib:$LD_LIBRARY_PATH
# run tests in parallel
nprocs=`getconf _NPROCESSORS_ONLN`
cd $build_dir && ctest --output-on-failure -j ${nprocs}