dev/modules/sysconfig/templates/start-test-suite-dev.sh.erb
author Yves-Marie Haussonne <ymh.work+github@gmail.com>
Fri, 09 May 2014 18:34:46 +0200
changeset 655 cac6781d8b7f
parent 642 5d037d947cd6
permissions -rwxr-xr-x
add the file settings_dev.py to be cleaned, set cache timeout to 0 (i.e. disable cache for tests)

#!/bin/bash

echo "---------------------"
echo "Starting test server"

DEV_FOLDER="<%= @vagrant_base_path %>"

pushd "$DEV_FOLDER" > /dev/null
vagrant ssh -c "/srv/comt/test-suite/start-testserver.sh"
popd > /dev/null


TESTSERVER_STARTED=True
WORKSPACE_INFO="workspace.info.dev.js"

echo "---------------------"
echo "Starting karma tests"
. ./start-test-suite.sh ./karma.conf.dev.js $@

echo "---------------------"
echo "stopping test server + output test server logs"

read -p "Keep testserver (PID $TESTSERVER_PID) running ? (y/N)" -n 1 -r -t 5
echo    # (optional) move to a new line

if [[ $REPLY =~ ^[Yy]$ ]]; then
    exit 0
fi

pushd "$DEV_FOLDER" > /dev/null
vagrant ssh -c "/srv/comt/test-suite/clean-testserver.sh"
popd /dev/null