diff options
author | Michael Basnight <mbasnight@gmail.com> | 2014-02-01 00:24:57 +0000 |
---|---|---|
committer | Michael Basnight <mbasnight@gmail.com> | 2014-02-01 01:19:58 +0000 |
commit | b06db4ab7f4bdb7843f8b75205570041a0a045d7 (patch) | |
tree | 7a3397e3033dd0b678ec3dfe1f16f61124139430 /tools | |
parent | 67e3e7a76e63b1758eba298c564f348f54704c66 (diff) | |
download | trove-b06db4ab7f4bdb7843f8b75205570041a0a045d7.tar.gz |
Migrating trove to entry points
PBR/Distribute generates binscripts for us. By moving the
binscript code into the source tree, we can unit test it
as well. Run setup.py develop to generate the binscripts for
development use.
implements blueprint entrypoints-for-binscripts
Change-Id: I9ad4bb4ddc55f64bcd806c588a795cd6e0847aa9
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 |