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##*/}
|
|
|
|
echo 'Building dockerfiles for test: ' "$test_name"
|
|
|
|
touch "$test_name".name
|
|
|
|
|
|
|
|
# Start netcon container to be tested
|
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
|
|
|
|
docker rm $monitor_container
|