view Start.sh @ 437:e769bcf2b94f

added copyright UCLouvain
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 25 Nov 2021 15:43:32 +0100
parents ad98466353c6
children 2ca9e31d582f
line wrap: on
line source

#!/bin/bash

# Without Docker on Ubuntu 18.04:
#
# (1) Compile Orthanc 0.8.6:
#   $ cd $HOME/Releases/
#   $ hg clone -u Orthanc-0.8.6 https://hg.orthanc-server.com/orthanc Orthanc-0.8.6
#   $ mkdir $HOME/Releases/Orthanc-0.8.6/Build
#   $ cd $HOME/Releases/Orthanc-0.8.6/Build
#   $ cmake .. -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD=ON
#   $ make -j4 UnitTests Orthanc
#
# (2) Run the integration tests using Orthanc 0.8.6:
#   $ rm -rf /tmp/OrthancStorage ; python ./Tests/Run.py --orthanc=$HOME/Releases/Orthanc-0.8.6/Build/Orthanc --force
#

set -ex

if [ ! -f "./getscu-3.6.5" ]; then
    # This binary was generated by running Linux Standard Base on
    # "Resources/DcmtkTools" in the Orthanc source distribution,
    # as DCMTK 3.6.0 does not contain "getscu"
    wget http://orthanc.osimis.io/ThirdPartyDownloads/linux-standard-base/getscu-3.6.5
    chmod +x ./getscu-3.6.5
fi

sudo docker run --rm -t -i -p 5000:5000 -p 5001:5001 \
     -v `pwd`:/tmp/tests:ro \
     -v `pwd`/getscu-3.6.5:/usr/bin/getscu:ro \
     --entrypoint python jodogne/orthanc-tests \
     /tmp/tests/Tests/Run.py --docker $*