summaryrefslogtreecommitdiffstats
path: root/tests/run_pyload.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run_pyload.sh')
-rwxr-xr-xtests/run_pyload.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/run_pyload.sh b/tests/run_pyload.sh
new file mode 100755
index 000000000..9ffc04b4f
--- /dev/null
+++ b/tests/run_pyload.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+PIDFILE="tests/pyload.pid"
+if [ -f "$PIDFILE" ]
+then
+ kill -9 $(<"$PIDFILE")
+fi
+
+cp tests/config/pyload.db.org tests/config/pyload.db
+cp tests/config/pyload.conf.org tests/config/pyload.conf
+
+PYTHON=python
+which python2 > /dev/null && PYTHON=python2
+
+touch pyload.out
+$PYTHON pyload.py -d --configdir=tests/config > pyload.out 2> pyload.err &
+
+for i in {1..30}; do
+ grep "pyLoad is up and running" pyload.out > /dev/null && echo "pyLoad started" && break
+ sleep 1
+done
+
+echo "pyLoad start script finished"
+