diff options
Diffstat (limited to 'scripts/run_containers')
-rwxr-xr-x | scripts/run_containers | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/scripts/run_containers b/scripts/run_containers deleted file mode 100755 index d2c8066..0000000 --- a/scripts/run_containers +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bash - -# This is a sanity test script for the CODI and toolchain Docker images. -# This runs the test containers. -# Then it runs ceed -l to talk to codi to list the 4 test toolchains -# -# Example: -# -# ./tests/run_containers [NUM_TOOLCHAIN CONATINERS TO START DEFAULT:4] - -TOPDIR=`git rev-parse --show-toplevel` -# note, currently the turff node and the container name MUST match exactly or have matching formats -# Example: TURFFID=repo/image:tag and container name repo-image-tag -# The Docker API does not allow special characters in container names except '-' -NAME_BASE="crops-toolchain-test" -NUM_TOOLCHAINS=4 -if [ "$1" != "" ]; then - NUM_TOOLCHAINS=$1 -fi - - -if [ "$DEBUG" == "" ]; then - echo "Start CODI container" - docker run -d --name codi-test -v /var/run/docker.sock:/var/run/docker.sock --net=host crops/codi:test || \ - { echo 'docker run codi failed' ; exit 1; } -else - echo "Start DEBUG CODI container" - docker run -d --name codi-test-debug -v /var/run/docker.sock:/var/run/docker.sock --net=host crops/codi:testdebug || \ - { echo 'docker run codi failed' ; exit 1; } -fi -II=0 -while [ $II -lt $NUM_TOOLCHAINS ]; do - echo "Start toolchain container $II" - sleep 2; - docker run -d --name ${NAME_BASE}${II} -v /crops/:/crops/ --env TURFFID=${NAME_BASE}${II} --net=host crops/toolchain:test || \ - { echo 'docker run toolchain-test${II} failed' ; exit 1; } - let II=$II+1 -done - -echo "Start Zephyr toolchain container" -sleep 2; -mkdir -p $HOME/crops-test-workspace -docker run -d --name zephyr-test -v $HOME/crops-test-workspace/:/crops/ --env TURFFID=zephyr-test --net=host crops/zephyr:test || \ - { echo 'docker run zephyr-test failed' ; exit 1; } - -echo "List containers known to CODI" -sleep 5; -cd ${TOPDIR}/ceed - -# if docker-machine exists then we are on a mac/windows and use the address of the vm we are running in -# else localhost -if [ -x "$(command -v docker-machine)" ]; then - NAME=`docker-machine active` - ADDRESS=`docker-machine ip ${NAME}` -else - # linux can run over unix sockets rather than ip but ip is more cross platform - ADDRESS=127.0.0.1 -fi -./ceed -i $ADDRESS -s 10000 -l |