2015-12-04 20:39:54 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Runs test image and monitor image as daemons
|
2015-11-20 09:08:38 +00:00
|
|
|
test_name=${PWD##*/}
|
2015-12-07 06:37:23 +00:00
|
|
|
echo 'Starting containers for: ' "$test_name"
|
2015-11-20 09:08:38 +00:00
|
|
|
touch "$test_name".name
|
2015-12-03 15:11:33 +00:00
|
|
|
test_container=$(docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name":latest)
|
|
|
|
monitor_container=$(docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name"_monitor:latest)
|
2015-11-20 09:08:38 +00:00
|
|
|
|
2015-12-03 15:11:33 +00:00
|
|
|
echo "waiting $netcon_test_wait_time for test to complete."
|
|
|
|
sleep $netcon_test_wait_time
|
2015-12-04 20:39:54 +00:00
|
|
|
docker stop $(docker ps -a -q)
|
2015-12-03 15:11:33 +00:00
|
|
|
docker rm $test_container
|
2015-12-07 06:37:23 +00:00
|
|
|
docker rm $monitor_container
|
|
|
|
|
|
|
|
rm -f *.name
|