diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/start-fake-mode.sh | 18 | ||||
-rwxr-xr-x | tools/stop-fake-mode.sh | 16 |
2 files changed, 34 insertions, 0 deletions
diff --git a/tools/start-fake-mode.sh b/tools/start-fake-mode.sh new file mode 100755 index 00000000..a4fbf952 --- /dev/null +++ b/tools/start-fake-mode.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# Arguments: Use --pid_file to specify a pid file location. + + +if [ ! -d ".tox/py26" ]; then + tox -epy26 +fi + +function run() { + .tox/py26/bin/python $@ +} +run bin/trove-manage \ + --config-file=etc/trove/trove.conf.test db_wipe \ + trove_test.sqlite mysql fake +run bin/trove-fake-mode \ + --fork --config-file=etc/trove/trove.conf.test \ + $@ + diff --git a/tools/stop-fake-mode.sh b/tools/stop-fake-mode.sh new file mode 100755 index 00000000..ccc42e10 --- /dev/null +++ b/tools/stop-fake-mode.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Arguments: if given the first argument is the location of a pid file. +if [ $# -lt 1 ]; then + export PID_FILE=".pid" +else + export PID_FILE=$1 +fi +if [ -f $PID_FILE ]; +then + cat $PID_FILE + kill `cat $PID_FILE` + echo "Stopping server." + rm $PID_FILE +else + echo "pid file not found." +fi |