diff options
| author | Johan FitiƩ <jfitie@gmail.com> | 2017-07-25 19:48:44 +0200 |
|---|---|---|
| committer | Johan FitiƩ <jfitie@gmail.com> | 2017-07-25 19:48:44 +0200 |
| commit | c520709bea12c4c889380899386645a1a9ca2053 (patch) | |
| tree | 9d30e81a8eb5eb9bb51f1e0b348510d76bab6ff7 | |
| parent | a5e5d8dfd16f27cb9f4121a15bf98a34925a8165 (diff) | |
| download | navit-c520709bea12c4c889380899386645a1a9ca2053.tar.gz | |
Automatic pitch calculation
| -rw-r--r-- | ci/run_linux_tests.sh | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/ci/run_linux_tests.sh b/ci/run_linux_tests.sh index 66f65d1fa..4311696b1 100644 --- a/ci/run_linux_tests.sh +++ b/ci/run_linux_tests.sh @@ -65,12 +65,15 @@ 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 x in 800 1024 1280 1366 1920 2560; # x resolution + for x in 320 800 854 1280 1920 2560 3840; # x resolution do - for y in 600 768 800 1024 1080 1440; # y resolution + for y in 240 400 480 720 1080 1440 1600 2160; # y resolution do + i=$((i++)) # 2*7*8=112 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 @@ -85,19 +88,10 @@ do rx=$x ry=$y fi + p=`python -c 'import math;print int(round(20*math.sqrt(320*240)/math.sqrt('$x'*'$y'),0))'` # pitch // ROUND(20*SQRT(320*240)/SQRT(x*y)) + 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 - 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 - 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 + linux_test gtk_drawing_area_"$i"_"$rx"_"$ry"_"$p" done # y done # x done # l |
