summaryrefslogtreecommitdiff
path: root/tools/ci
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-04-27 21:51:13 +0300
committerAndrei Karas <akaras@inbox.ru>2017-04-27 22:16:20 +0300
commit0e3d6b91e330a1f2c2f54031b87db9474da4e45c (patch)
treede3576b2d49860040fd2f18bbd8d51aca245df12 /tools/ci
parentcdc8a9803d664efd2afd19b6201291d351ba1ebb (diff)
downloadplus-0e3d6b91e330a1f2c2f54031b87db9474da4e45c.tar.gz
plus-0e3d6b91e330a1f2c2f54031b87db9474da4e45c.tar.bz2
plus-0e3d6b91e330a1f2c2f54031b87db9474da4e45c.tar.xz
plus-0e3d6b91e330a1f2c2f54031b87db9474da4e45c.zip
Add script for run manaplus binary many times until error detected.
Diffstat (limited to 'tools/ci')
-rwxr-xr-xtools/ci/scripts/runtest.sh5
-rwxr-xr-xtools/ci/scripts/runtests.sh38
2 files changed, 38 insertions, 5 deletions
diff --git a/tools/ci/scripts/runtest.sh b/tools/ci/scripts/runtest.sh
index 2c5a8a012..80b54a0ff 100755
--- a/tools/ci/scripts/runtest.sh
+++ b/tools/ci/scripts/runtest.sh
@@ -1,10 +1,5 @@
#!/bin/bash
-export SDL_VIDEODRIVER="dummy"
-ulimit -c unlimited -S
-ulimit -c unlimited
-rm -rf core*
-
./src/manaplus --renderer=0 >logs/run.log 2>&1 &
export PID=$!
sleep 12s
diff --git a/tools/ci/scripts/runtests.sh b/tools/ci/scripts/runtests.sh
new file mode 100755
index 000000000..80809fc55
--- /dev/null
+++ b/tools/ci/scripts/runtests.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+export SDL_VIDEODRIVER="dummy"
+ulimit -c unlimited -S
+ulimit -c unlimited
+rm -rf core*
+
+echo "clean config runs"
+n=0
+while true; do
+ echo "run test ${n}"
+ rm "${HOME}/.config/mana/mana/config.xml"
+ rm "/root/.config/mana/mana/config.xml"
+ ./tools/ci/scripts/runtest.sh
+ if [ "$?" != 0 ]; then
+ exit 1
+ fi
+ if [[ $n -ge 5 ]]; then
+ exit 0
+ fi
+ sleep 5s
+ n=$((n+1))
+done
+
+echo "existing config runs"
+n=0
+while true; do
+ echo "run test ${n}"
+ ./tools/ci/scripts/runtest.sh
+ if [ "$?" != 0 ]; then
+ exit 1
+ fi
+ if [[ $n -ge 5 ]]; then
+ exit 0
+ fi
+ sleep 5s
+ n=$((n+1))
+done