From e433353b877f9cfc735b4368d92b80d091264c65 Mon Sep 17 00:00:00 2001 From: drebs Date: Sun, 12 Jun 2016 13:26:34 -0300 Subject: [test] add commit/branch checkout to docker test running script --- scripts/docker/helper/run-test.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/docker/helper/run-test.sh b/scripts/docker/helper/run-test.sh index c3bdd00c..9b3ec0c9 100755 --- a/scripts/docker/helper/run-test.sh +++ b/scripts/docker/helper/run-test.sh @@ -15,18 +15,22 @@ TIMEOUT=20 # parse command -if [ ${#} -ne 1 ]; then +if [ ${#} -lt 1 -o ${#} -gt 2 ]; then echo "Usage: ${0} perf|bootstrap" exit 1 fi test=${1} - if [ "${test}" != "perf" -a "${test}" != "bootstrap" ]; then echo "Usage: ${0} perf|bootstrap" exit 1 fi +branch="" +if [ ${#} -eq 2 ]; then + branch="SOLEDAD_BRANCH=${2}" +fi + # make sure the image is up to date make image @@ -36,7 +40,7 @@ scriptpath=$(dirname "${script}") # run the server tempfile=`mktemp -u` -make run-server CONTAINER_ID_FILE=${tempfile} +make run-server CONTAINER_ID_FILE=${tempfile} ${branch} # wait for server until timeout container_id=`cat ${tempfile}` @@ -67,5 +71,5 @@ fi set -e # run the test -make run-client-${test} CONTAINER_ID_FILE=${tempfile} +make run-client-${test} CONTAINER_ID_FILE=${tempfile} ${branch} rm -r ${tempfile} -- cgit v1.2.3