From 1e3fea60966bbb518774ce7d71e00d5ae82e4d75 Mon Sep 17 00:00:00 2001 From: Andreas Wilke Date: Thu, 21 Jun 2018 16:32:16 -0600 Subject: [PATCH] Files for CWL testing --- tests/awe-cwl-submitter-wrapper.sh | 5 +++ tests/setup-env.sh | 53 ++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 tests/awe-cwl-submitter-wrapper.sh create mode 100755 tests/setup-env.sh diff --git a/tests/awe-cwl-submitter-wrapper.sh b/tests/awe-cwl-submitter-wrapper.sh new file mode 100644 index 00000000..995dd57f --- /dev/null +++ b/tests/awe-cwl-submitter-wrapper.sh @@ -0,0 +1,5 @@ +#!/bin/bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +${DIR}/awe-submitter --pack --wait \ + --shockurl=${SHOCK_SERVER} \ + --serverurl=${AWE_SERVER} --download_files=true $@ diff --git a/tests/setup-env.sh b/tests/setup-env.sh new file mode 100755 index 00000000..17c6bc99 --- /dev/null +++ b/tests/setup-env.sh @@ -0,0 +1,53 @@ + +build=$1 +echo Setup build in ${build} +cd $1 + +export TAG=CWL + +git clone https://github.com/MG-RAST/Skyport2.git +git clone https://github.com/MG-RAST/AWE.git +git clone https://github.com/common-workflow-language/common-workflow-language.git +git clone https://github.com/common-workflow-language/cwltest.git + +# Build cwltest +cd cwltest/ +mkdir install +export PYTHONPATH=$PATHONPATH:`pwd`/install//lib/python2.7/site-packages/ +export PATH=$PATH:`pwd`/install/bin/ +python setup.py install --prefix `pwd`/install/ +cd .. + +### Build ne AWE container + +#git clone https://github.com/MG-RAST/Skyport2.git +### Build ne AWE container +export TAG=CWL +cd AWE +docker build -t mgrast/awe:${TAG} -f Dockerfile . +docker build -t mgrast/awe-worker:${TAG} -f Dockerfile_worker . +docker build -t mgrast/awe-submitter:${TAG} -f Dockerfile_submitter . + +### Copy submitter +docker create --name submitter mgrast/awe-submitter:${TAG} +docker cp submitter:/go/bin/awe-submitter awe-submitter +docker rm submitter + +### Start stack +cd ../Skyport2 +./init.sh +. ./skyport2.env +# skyport2.env overwrites TAG - set back +export TAG=CWL +docker-compose down +docker-compose -f Docker/Compose/skyport-awe-jenkins.yaml up -d +sleep 60 + +# Execute tests +cd ../common-workflow-language/ +./run_test.sh RUNNER=`pwd`/../AWE/tests/awe-cwl-submitter-wrapper.sh + +# Shut down +cd ../Skyport2 +docker-compose -f Docker/Compose/skyport-awe-jenkins.yaml down +## TEST COMES HERE