3 # Test a release. To make a release see make-release.sh
5 # 1) Get source code for a tagged release
7 # $ ./test-release.sh get-source <path/to/source> <release-tag>
9 # 2) Configure the source by telling it where to find externals and where to install (must not exist)
11 # $ ./test-release.sh configure-source <path/to/source> <path/to/externals> <path/to/install>
13 # 3) Build, install and run tests
15 # $ ./test-release.sh install <path/to/source>
21 local dir=${1?no directory given} ; shift
22 if [ ! -d $dir ] ; then
23 echo "No such directory: $dir"
35 local source=${1?no sourcedir given} ; shift
36 local tag=${1?no tag given} ; shift
38 if [ -d $source ] ; then
39 echo "Source directory already exists: $source"
43 git clone https://github.com/WireCell/wire-cell-build.git $source
45 git checkout -b $tag $tag
48 git submodule foreach git checkout -b $tag $tag
54 function configure-source
56 local source=$(readlink -f ${1?must provide source directory}) ; shift
57 local externals=$(readlink -f ${1?must provide externals directory}) ; shift
58 local install=$(readlink -f ${1?must provide install directory}) ; shift
61 if [ ! -d "$externals" ] ; then
62 echo "No externals directory: $externals"
65 if [ -d "$install" ] ; then
66 echo "Install directory already exits: $install"
73 ./wcb configure --prefix=$install \
74 --boost-includes=$externals/include \
75 --boost-libs=$externals/lib \
77 --with-eigen-include=$externals/include/eigen3 \
78 --with-jsoncpp=$externals \
79 --with-jsonnet=$externals \
80 --with-zlib=$externals \
82 --with-fftw=$externals \
83 --with-root=$externals
88 env LD_LIBRARY_PATH=$externals/lib:$install/lib "\$@"
97 local source=$(readlink -f ${1?must provide source directory}) ; shift
100 ./wcb --notest || exit 1
101 ./wcb --notest install || exit 1
102 ./wcb --alltests --testcmd="$source/tester.sh %s" || exit 1