_two_party_test.sh 579 B

12345678910111213141516
  1. #!/bin/bash
  2. # Runs test image and monitor image as daemons
  3. test_name=${PWD##*/}
  4. echo 'Starting containers for: ' "$test_name"
  5. touch "$test_name".name
  6. test_container=$(docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name":latest)
  7. monitor_container=$(docker run -d -it -v $PWD/../../_results:/opt/results --device=/dev/net/tun "$test_name"_monitor:latest)
  8. echo "waiting $netcon_test_wait_time for test to complete."
  9. sleep $netcon_test_wait_time
  10. docker stop $(docker ps -a -q)
  11. docker rm $test_container
  12. docker rm $monitor_container
  13. rm -f *.name