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
This commit is contained in:
18
tools/start-fake-mode.sh
Executable file
18
tools/start-fake-mode.sh
Executable file
@@ -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 \
|
||||
$@
|
||||
|
||||
16
tools/stop-fake-mode.sh
Executable file
16
tools/stop-fake-mode.sh
Executable file
@@ -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
|
||||
Reference in New Issue
Block a user