-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterim.sh
More file actions
17 lines (13 loc) · 778 Bytes
/
interim.sh
File metadata and controls
17 lines (13 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
# interim.sh is called in between test runs for when a test profile is set via TimesToRun to execute multiple times. This is useful for restoring a program's state or any other changes that need to be made in between runs.
BASE_PWD=`dirname "$0"`
argument=$1
ubuntu_version=$(echo $argument | cut -f1 -d-)
ubuntu_version_name=$(echo $argument | cut -f2 -d-)
image_name=bperel/pastec-ubuntu-`echo $ubuntu_version | sed "s/\.//g"`-timestamps
container_name=pastec-ubuntu-$ubuntu_version-1
docker rm -f $container_name
docker run -d --name $container_name -v $BASE_PWD/sample_images/:/tmp/sample_images/ -v $BASE_PWD/scripts:/scripts $image_name || exit 1
while ! `docker logs $container_name | grep -q "Ready to accept queries."`; do
echo -n "." && sleep 1
done