summaryrefslogtreecommitdiff
path: root/scripts/docker/helper
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2016-06-10 22:07:35 -0300
committerdrebs <drebs@leap.se>2016-06-22 17:51:18 -0300
commit78d61dfaadf9bcac7258a33738c660b238b7bf27 (patch)
tree9cb2797e0cf0b09335be32d4f54b1e6d583a9558 /scripts/docker/helper
parente14f17247ce03f1c49cab3c944039ff9aba84f64 (diff)
[test] refactor of docker scripts
Diffstat (limited to 'scripts/docker/helper')
-rwxr-xr-xscripts/docker/helper/run-test.sh8
-rwxr-xr-xscripts/docker/helper/run-until-error.sh12
2 files changed, 16 insertions, 4 deletions
diff --git a/scripts/docker/helper/run-test.sh b/scripts/docker/helper/run-test.sh
index 1b0e3db7..c3bdd00c 100755
--- a/scripts/docker/helper/run-test.sh
+++ b/scripts/docker/helper/run-test.sh
@@ -16,14 +16,14 @@ TIMEOUT=20
# parse command
if [ ${#} -ne 1 ]; then
- echo "Usage: ${0} perf|connect"
+ echo "Usage: ${0} perf|bootstrap"
exit 1
fi
test=${1}
-if [ "${1}" != "perf" -a "${1}" != "perf" ]; then
- echo "Usage: ${0} perf|connect"
+if [ "${test}" != "perf" -a "${test}" != "bootstrap" ]; then
+ echo "Usage: ${0} perf|bootstrap"
exit 1
fi
@@ -67,5 +67,5 @@ fi
set -e
# run the test
-make run-${test}-test CONTAINER_ID_FILE=${tempfile}
+make run-client-${test} CONTAINER_ID_FILE=${tempfile}
rm -r ${tempfile}
diff --git a/scripts/docker/helper/run-until-error.sh b/scripts/docker/helper/run-until-error.sh
new file mode 100755
index 00000000..a4cab6ec
--- /dev/null
+++ b/scripts/docker/helper/run-until-error.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+status=0
+runs=10
+
+while [ ${status} -eq 0 -a ${runs} -gt 0 ]; do
+ echo "=== RUN ${runs}"
+ make rm-all-containers
+ make run-perf-test
+ status=${?}
+ runs=`expr ${runs} - 1`
+done