summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan FitiƩ <jfitie@gmail.com>2017-07-20 08:14:02 +0200
committerJohan FitiƩ <jfitie@gmail.com>2017-07-20 08:14:02 +0200
commita5e5d8dfd16f27cb9f4121a15bf98a34925a8165 (patch)
tree1923f8c5163b07b7cf21aedef0a71c26f43248ae
parent942583989224ef8232ba6f39a09a060049781d39 (diff)
downloadnavit-a5e5d8dfd16f27cb9f4121a15bf98a34925a8165.tar.gz
Reuse instance for pitch
-rw-r--r--ci/run_linux_tests.sh56
1 files changed, 30 insertions, 26 deletions
diff --git a/ci/run_linux_tests.sh b/ci/run_linux_tests.sh
index c02444079..66f65d1fa 100644
--- a/ci/run_linux_tests.sh
+++ b/ci/run_linux_tests.sh
@@ -65,35 +65,39 @@ sed -i -e 's@libbinding_dbus.so" active="no"@libbinding_dbus.so" active="yes"@'
linux_test qt5_qml
# Test different pitches and resolutions
-i=0 # index
for l in 0 1; # portrait (0), landscape (1)
do
- for p in 0 1 2 5 10 15 25 45; # pitch
+ for x in 800 1024 1280 1366 1920 2560; # x resolution
do
- for x in 800 1024 1280 1366 1920 2560; # x resolution
+ for y in 600 768 800 1024 1080 1440; # y resolution
do
- for y in 600 768 800 1024 1080 1440; # y resolution
+ cp navit.xml.bak navit.xml
+ # run gtk test
+ sed -i -e 's@name="Local GPS" profilename="car" enabled="yes" active="1"@name="Local GPS" profilename="car" enabled="no" active="0"@' navit.xml
+ sed -i -e 's@name="Demo" profilename="car" enabled="no" @name="Demo" profilename="car" enabled="yes" follow="1" refresh="1"@' navit.xml
+ sed -i -e 's@type="internal" enabled@type="internal" fullscreen="1" font_size="350" enabled@' navit.xml
+ sed -i -e 's@libbinding_dbus.so" active="no"@libbinding_dbus.so" active="yes"@' navit.xml
+ if [ $l -eq 0 ]
+ then # portrait
+ rx=$y
+ ry=$x
+ else # landscape
+ rx=$x
+ ry=$y
+ fi
+ sed -i -e 's@graphics type="gtk_drawing_area"@graphics type="gtk_drawing_area" w="'$rx'" h="'$ry'"@' navit.xml # set resolution
+ log=gtk_drawing_area_"$rx"_"$ry"
+ mkdir $CIRCLE_ARTIFACTS/logs_$log
+ ./navit >$CIRCLE_ARTIFACTS/logs_$log/stdout.txt 2>$CIRCLE_ARTIFACTS/logs_$log/stderr.txt &
+ pid=$!
+ sleep 5
+ for p in 0 1 2 5 10 15 25 45; # pitch
do
- i=$((i++)) # 2*8*6*6=576 test vectors
- # restore config
- cp navit.xml.bak navit.xml
- # run gtk test
- sed -i -e 's@name="Local GPS" profilename="car" enabled="yes" active="1"@name="Local GPS" profilename="car" enabled="no" active="0"@' navit.xml
- sed -i -e 's@name="Demo" profilename="car" enabled="no" @name="Demo" profilename="car" enabled="yes" follow="1" refresh="1"@' navit.xml
- sed -i -e 's@type="internal" enabled@type="internal" fullscreen="1" font_size="350" enabled@' navit.xml
- sed -i -e 's@libbinding_dbus.so" active="no"@libbinding_dbus.so" active="yes"@' navit.xml
- if [ $l -eq 0 ]
- then # portrait
- rx=$y
- ry=$x
- else # landscape
- rx=$x
- ry=$y
- fi
- sed -i -e 's@navit center="11.5666 48.1333"@navit center="11.5666 48.1333" pitch="'$p'"@' navit.xml # set pitch
- sed -i -e 's@graphics type="gtk_drawing_area"@graphics type="gtk_drawing_area" w="'$rx'" h="'$ry'"@' navit.xml # set resolution
- linux_test gtk_drawing_area_"$i"_"$rx"_"$ry"_"$p"
- done # y
- done # x
- done # p
+ dbus-send --print-reply --session --dest=org.navit_project.navit /org/navit_project/navit/default_navit org.navit_project.navit.navit.set_attr string:"pitch" variant:int32:$p
+ sleep 2
+ import -window root $CIRCLE_ARTIFACTS/logs_"$log"/"$log"_"$p".png
+ done # p
+ kill $pid
+ done # y
+ done # x
done # l