/[zanavi_public1]/navit/circle.yml
ZANavi

Contents of /navit/circle.yml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 51 - (hide annotations) (download)
Mon Jul 25 19:29:08 2016 UTC (7 years, 8 months ago) by zoff99
File size: 30806 byte(s)
v2.0.52
1 zoff99 50 machine:
2     timezone:
3     Europe/Vienna
4     environment:
5 zoff99 51 ZEMU_: "zanavi23"
6 zoff99 50 EMU_: "zanavi21"
7     XEMU_: "zanavi10"
8 zoff99 51 Zsdpath: "/sdcard"
9 zoff99 50 sdpath: "/storage/sdcard"
10     Xsdpath: "/mnt/sdcard"
11 zoff99 51 ###############################
12     # 0 -> no
13     # 1 -> C
14     # 2 -> Java
15     COVERITY_BUILD_: 0
16     ###############################
17 zoff99 50 dependencies:
18     cache_directories:
19     - ~/.android
20     #- ~/maps
21     pre:
22     - sudo apt-get update > /dev/null 2> /dev/null
23     - sudo apt-get install libpng12-dev > /dev/null 2> /dev/null
24     - sudo apt-get install librsvg2-bin > /dev/null 2> /dev/null
25     - sudo apt-get install libfreetype6-dev > /dev/null 2> /dev/null
26     - sudo apt-get install libdbus-glib-1-dev > /dev/null 2> /dev/null
27     - sudo apt-get install g++ > /dev/null 2> /dev/null
28     - sudo apt-get install gettext > /dev/null 2> /dev/null
29     - sudo apt-get install ant > /dev/null 2> /dev/null
30     - sudo apt-get install libsaxonb-java > /dev/null 2> /dev/null
31     - sudo apt-get install lib32stdc++6 > /dev/null 2> /dev/null
32     - sudo apt-get install lib32z1 > /dev/null 2> /dev/null
33     - sudo apt-get install zip > /dev/null 2> /dev/null
34     - sudo apt-get install bc > /dev/null 2> /dev/null
35     - sudo apt-get install libfftw3-double3 > /dev/null 2> /dev/null
36     - sudo apt-get install libmagickcore5 > /dev/null 2> /dev/null
37     - sudo apt-get install perlmagick > /dev/null 2> /dev/null
38     - sudo apt-get install liblwp-useragent-determined-perl > /dev/null 2> /dev/null
39     - sudo apt-get install xvfb > /dev/null 2> /dev/null
40     - sudo apt-get install xdotool > /dev/null 2> /dev/null
41 zoff99 51 - sudo apt-get install telnet > /dev/null 2> /dev/null
42     - sudo apt-get install x11-utils > /dev/null 2> /dev/null
43     - sudo apt-get install xvkbd > /dev/null 2> /dev/null
44     - echo y | android update sdk --no-ui --all --filter "tools"
45     - echo y | android update sdk --no-ui --all --filter build-tools-23.0.1
46     - echo y | android update sdk --no-ui --all --filter android-23
47     - echo y | android update sdk --no-ui --all --filter platform-tools-preview
48     - echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-23
49     - echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-addon-google_apis-google-23
50     - echo y | android update sdk --no-ui --all --filter addon-google_apis-google-23
51 zoff99 50
52 zoff99 51 - if [ "$COVERITY_BUILD_""x" != "0x" ]; then mkdir ~/cov_scan/ && wget https://scan.coverity.com/download/linux-64 --post-data "token=$COVERITY_TOKEN&project=zoff99%2Fzanavi" -O ~/cov_scan/coverity_tool.tgz && wget 'http://www.catb.org/~esr/coverity-submit/coverity-submit-1.17.tar.gz' -O ~/cov_scan/coverity-submit.tar.gz && cd ~/cov_scan/ && tar -xzvf coverity_tool.tgz ; fi
53 zoff99 50
54 zoff99 51 - bash -c 'chmod a+rx ~/zanavi/ci/do_android.sh ; ~/zanavi/ci/do_android.sh'
55    
56     - ls -al /home/ubuntu/android-build/navit/.libs/lib_data_data_com.zoffcc.applications.zanavi_lib_navit.so ; exit 0
57     - ls -al /home/ubuntu/android-build/navit/.libs/navit2 ; exit 0
58     - ls -al /home/ubuntu/android-build/navit/navit2 ; exit 0
59     - if [ "$COVERITY_BUILD_""x" != "0x" ]; then ls -al /home/ubuntu/android-build/cov-int/ ; exit 0 ; fi
60     - if [ "$COVERITY_BUILD_""x" != "0x" ]; then cp -v /home/ubuntu/android-build/cov-int/build-log.txt $CIRCLE_ARTIFACTS/ ; fi
61     - if [ "$COVERITY_BUILD_""x" != "0x" ]; then cd /home/ubuntu/android-build/ ; tar -czvf $CIRCLE_ARTIFACTS/covint.tar.gz cov-int ; fi
62    
63 zoff99 50 - ls -al ~/maps/ ; exit 0
64     - mkdir -p ~/maps/ ; exit 0
65     - ls -al ~/maps/
66    
67 zoff99 51 - mkdir ~/_downloadmaps_/
68     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_005.bin "http://ci.zanavi.cc/data/france.bin" ; touch ~/_downloadmaps_/005 :
69     background: true
70     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_002.bin "http://ci.zanavi.cc/data/germany.bin" ; touch ~/_downloadmaps_/002 :
71     background: true
72     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_010.bin "http://ci.zanavi.cc/data/great_britain.bin" ; touch ~/_downloadmaps_/010 :
73     background: true
74 zoff99 50
75 zoff99 51 - wget --no-check-certificate -t 100 -O ~/maps/navitmap_001.bin "http://ci.zanavi.cc/data/austria.bin" ; touch ~/_downloadmaps_/001 :
76     background: true
77     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_003.bin "http://ci.zanavi.cc/data/netherlands.bin" ; touch ~/_downloadmaps_/003 :
78     background: true
79     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_004.bin "http://ci.zanavi.cc/data/belgium.bin" ; touch ~/_downloadmaps_/004 :
80     background: true
81     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_006.bin "http://ci.zanavi.cc/data/italy.bin" ; touch ~/_downloadmaps_/006 :
82     background: true
83     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_007.bin "http://ci.zanavi.cc/data/liechtenstein.bin" ; touch ~/_downloadmaps_/007 :
84     background: true
85     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_008.bin "http://ci.zanavi.cc/data/luxembourg.bin" ; touch ~/_downloadmaps_/008 :
86     background: true
87     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_009.bin "http://ci.zanavi.cc/data/switzerland.bin" ; touch ~/_downloadmaps_/009 :
88     background: true
89     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_011.bin "http://ci.zanavi.cc/data/ireland.bin" ; touch ~/_downloadmaps_/011 :
90     background: true
91 zoff99 50
92 zoff99 51 - wget --no-check-certificate -t 100 -O ~/maps/navitmap_012.bin "http://ci.zanavi.cc/data/lithuania.bin" ; touch ~/_downloadmaps_/012 :
93     background: true
94     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_013.bin "http://ci.zanavi.cc/data/poland.bin" ; touch ~/_downloadmaps_/013 :
95     background: true
96     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_014.bin "http://ci.zanavi.cc/data/spain.bin" ; touch ~/_downloadmaps_/014 :
97     background: true
98     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_015.bin "http://ci.zanavi.cc/data/portugal.bin" ; touch ~/_downloadmaps_/015 :
99     background: true
100 zoff99 50
101 zoff99 51 - wget --no-check-certificate -t 100 -O ~/maps/navitmap_016.bin "http://ci.zanavi.cc/data/us-midwest.bin" ; touch ~/_downloadmaps_/016 :
102     background: true
103     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_017.bin "http://ci.zanavi.cc/data/us-northeast.bin" ; touch ~/_downloadmaps_/017 :
104     background: true
105     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_018.bin "http://ci.zanavi.cc/data/us-pacific.bin" ; touch ~/_downloadmaps_/018 :
106     background: true
107     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_019.bin "http://ci.zanavi.cc/data/us-south.bin" ; touch ~/_downloadmaps_/019 :
108     background: true
109     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_020.bin "http://ci.zanavi.cc/data/us-west.bin" ; touch ~/_downloadmaps_/020 :
110     background: true
111 zoff99 50
112 zoff99 51 - wget --no-check-certificate -t 100 -O ~/maps/navitmap_021.bin "http://ci.zanavi.cc/data/central_america.bin" ; touch ~/_downloadmaps_/021 :
113     background: true
114     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_022.bin "http://ci.zanavi.cc/data/south_america.bin" ; touch ~/_downloadmaps_/022 :
115     background: true
116     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_023.bin "http://ci.zanavi.cc/data/africa.bin" ; touch ~/_downloadmaps_/023 :
117     background: true
118     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_024.bin "http://ci.zanavi.cc/data/australia_oceania.bin" ; touch ~/_downloadmaps_/024 :
119     background: true
120     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_025.bin "http://ci.zanavi.cc/data/andorra.bin" ; touch ~/_downloadmaps_/025 :
121     background: true
122     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_026.bin "http://ci.zanavi.cc/data/belarus.bin" ; touch ~/_downloadmaps_/026 :
123     background: true
124     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_027.bin "http://ci.zanavi.cc/data/bosnia-herzegovina.bin" ; touch ~/_downloadmaps_/027 :
125     background: true
126     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_028.bin "http://ci.zanavi.cc/data/croatia.bin" ; touch ~/_downloadmaps_/028 :
127     background: true
128     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_029.bin "http://ci.zanavi.cc/data/cyprus.bin" ; touch ~/_downloadmaps_/029 :
129     background: true
130 zoff99 50
131 zoff99 51 - wget --no-check-certificate -t 100 -O ~/maps/navitmap_030.bin "http://ci.zanavi.cc/data/czech_republic.bin" ; touch ~/_downloadmaps_/030 :
132     background: true
133     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_031.bin "http://ci.zanavi.cc/data/estonia.bin" ; touch ~/_downloadmaps_/031 :
134     background: true
135     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_032.bin "http://ci.zanavi.cc/data/hungary.bin" ; touch ~/_downloadmaps_/032 :
136     background: true
137     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_033.bin "http://ci.zanavi.cc/data/greece.bin" ; touch ~/_downloadmaps_/033 :
138     background: true
139     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_034.bin "http://ci.zanavi.cc/data/kosovo.bin" ; touch ~/_downloadmaps_/034 :
140     background: true
141     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_035.bin "http://ci.zanavi.cc/data/macedonia.bin" ; touch ~/_downloadmaps_/035 :
142     background: true
143     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_036.bin "http://ci.zanavi.cc/data/moldova.bin" ; touch ~/_downloadmaps_/036 :
144     background: true
145     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_037.bin "http://ci.zanavi.cc/data/denmark.bin" ; touch ~/_downloadmaps_/037 :
146     background: true
147     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_038.bin "http://ci.zanavi.cc/data/russia-european-part.bin" ; touch ~/_downloadmaps_/038 :
148     background: true
149     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_039.bin "http://ci.zanavi.cc/data/serbia.bin" ; touch ~/_downloadmaps_/039 :
150     background: true
151 zoff99 50
152 zoff99 51 - wget --no-check-certificate -t 100 -O ~/maps/navitmap_040.bin "http://ci.zanavi.cc/data/slovakia.bin" ; touch ~/_downloadmaps_/040 :
153     background: true
154     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_041.bin "http://ci.zanavi.cc/data/slovenia.bin" ; touch ~/_downloadmaps_/041 :
155     background: true
156     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_042.bin "http://ci.zanavi.cc/data/sweden.bin" ; touch ~/_downloadmaps_/042 :
157     background: true
158     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_043.bin "http://ci.zanavi.cc/data/turkey.bin" ; touch ~/_downloadmaps_/043 :
159     background: true
160     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_044.bin "http://ci.zanavi.cc/data/cuba.bin" ; touch ~/_downloadmaps_/044 :
161     background: true
162     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_045.bin "http://ci.zanavi.cc/data/canada.bin" ; touch ~/_downloadmaps_/045 :
163     background: true
164     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_046.bin "http://ci.zanavi.cc/data/mexico.bin" ; touch ~/_downloadmaps_/046 :
165     background: true
166 zoff99 50
167 zoff99 51 - wget --no-check-certificate -t 100 -O ~/maps/navitmap_001.bin.idx "http://ci.zanavi.cc/data/planet.bin.idx" ; touch ~/_downloadmaps_/i_001 :
168     background: true
169     - wget --no-check-certificate -t 100 -O ~/maps/navitmap_049.bin "http://ci.zanavi.cc/data/restl_welt.bin" ; touch ~/_downloadmaps_/049 :
170     background: true
171    
172     - files=48 ; have=0 ; while [ $have -lt $files ]; do ls -al ~/_downloadmaps_/ ; have=`ls -1 ~/_downloadmaps_/|wc -l|tr -d " "` ; echo "have=""$have" ; sleep 30 ; done
173    
174     - ls -al ~/*txt ; exit 0
175     - rm -fv ~/stdout_wget_*.txt ; rm -fv ~/stderr_wget_*.txt ; exit 0
176     - ls -al $CIRCLE_ARTIFACTS ; exit 0
177     - rm -fv $CIRCLE_ARTIFACTS/stdout_wget_*.txt ; rm -fv $CIRCLE_ARTIFACTS/stderr_wget_*.txt ; exit 0
178    
179 zoff99 50 test:
180     pre:
181     - mksdcard -l e 18000M sdcard.img
182     - echo 'mtools_skip_check=1' > ~/.mtoolsrc
183     - android list targets
184     #
185 zoff99 51 - if [ "$EMU_" == "zanavi23" ]; then echo "no" | android create avd -n zanavi23 -f -t android-23 --abi default/armeabi-v7a --skin "WXGA720" ; fi
186     - if [ "$EMU_" == "zanavi23" ]; then cat ~/.android/avd/zanavi23.avd/config.ini ; fi
187     #- if [ "$EMU_" == "zanavi23" ]; then echo "more RAM" ; sed -i -e 's#.*hw.ramSize=.*#hw.ramSize=1014MB#' ~/.android/avd/zanavi23.avd/config.ini ; cat ~/.android/avd/zanavi23.avd/config.ini ; fi
188     #- if [ "$EMU_" == "zanavi23" ]; then echo "more HEAP" ; sed -i -e 's#.*vm.heapSize=.*#vm.heapSize=64MB#' ~/.android/avd/zanavi23.avd/config.ini ; cat ~/.android/avd/zanavi23.avd/config.ini ; fi
189     #- if [ "$EMU_" == "zanavi23" ]; then cat ~/.android/avd/zanavi23.avd/config.ini ; fi
190     #
191     - if [ "$EMU_" == "zanavi21" ]; then echo "no" | android create avd -n zanavi21 -f -t android-21 --abi default/armeabi-v7a --skin "WXGA720" ; fi
192 zoff99 50 - if [ "$EMU_" == "zanavi21" ]; then cat ~/.android/avd/zanavi21.avd/config.ini ; fi
193     - if [ "$EMU_" == "zanavi21" ]; then echo "more RAM" ; sed -i -e 's#.*hw.ramSize=.*#hw.ramSize=1014MB#' ~/.android/avd/zanavi21.avd/config.ini ; cat ~/.android/avd/zanavi21.avd/config.ini ; fi
194     - if [ "$EMU_" == "zanavi21" ]; then echo "more HEAP" ; sed -i -e 's#.*vm.heapSize=.*#vm.heapSize=64MB#' ~/.android/avd/zanavi21.avd/config.ini ; cat ~/.android/avd/zanavi21.avd/config.ini ; fi
195     - if [ "$EMU_" == "zanavi21" ]; then cat ~/.android/avd/zanavi21.avd/config.ini ; fi
196     #
197 zoff99 51 - if [ "$EMU_" == "zanavi10" ]; then echo "no" | android create avd -n zanavi10 -f -t android-10 --abi default/armeabi --skin "WQVGA432" ; fi
198 zoff99 50 - if [ "$EMU_" == "zanavi10" ]; then cat ~/.android/avd/zanavi10.avd/config.ini ; fi
199     - if [ "$EMU_" == "zanavi10" ]; then echo "more RAM" ; sed -i -e 's#.*hw.ramSize=.*#hw.ramSize=1024MB#' ~/.android/avd/zanavi10.avd/config.ini ; cat ~/.android/avd/zanavi10.avd/config.ini ; fi
200     - if [ "$EMU_" == "zanavi10" ]; then cat ~/.android/avd/zanavi10.avd/config.ini ; fi
201     #
202     - echo "$EMU_"
203     - echo "$sdpath"
204     override:
205     - ls -al ~/android-build/navit/android/bin/
206     - ls -al $CIRCLE_ARTIFACTS/
207     #- fb-adb shell "df"
208     #- fb-adb shell "df $sdpath/"
209    
210     - cd ~/maps/ ; du navitmap_0*bin|awk '{print $1 " + \\"}' > /tmp/sizes.txt ;echo -n "printf ' " > /tmp/calc.txt;cat /tmp/sizes.txt >> /tmp/calc.txt ; printf "0 \\\n' |bc\n" >> /tmp/calc.txt ; chmod u+x /tmp/calc.txt;eval /tmp/calc.txt > /tmp/res.txt ; printf "scale=2;`cat /tmp/res.txt` / 1024 / 1024 \n "|bc
211    
212     - mmd -i ~/zanavi/sdcard.img "::Android"
213     - mmd -i ~/zanavi/sdcard.img "::Android/data"
214     - mmd -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi"
215     - mmd -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files"
216     - mmd -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files/zanavi"
217     - mmd -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps"
218     - mmd -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi"
219     - mmd -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps"
220    
221     - mdir -i ~/zanavi/sdcard.img "::"
222     - mdir -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps"
223    
224     - cd ~/maps/ ; mcopy -v -i ~/zanavi/sdcard.img navitmap_*.bin* "::Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps"
225     - mdir -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps"
226    
227 zoff99 51 - import -window root $CIRCLE_ARTIFACTS/capture000a.png
228    
229     - emulator -avd "$EMU_" -sdcard sdcard.img -no-audio:
230 zoff99 50 background: true
231     parallel: true
232     - circle-android wait-for-boot
233    
234 zoff99 51 - xdotool search --class ''|xargs -L1 xdotool getwindowname|grep -v '^$'; xwininfo -root -tree -int
235     - sleep 210
236     - adb shell input keyevent 82
237     - sleep 10
238     - import -window root $CIRCLE_ARTIFACTS/capture_emulator_running.png
239 zoff99 50
240 zoff99 51
241 zoff99 50 - mkdir ~/yaml-tests/
242     #- wget -t 10 -O ~/yaml-tests/yaml1.zip "https://github.com/navit-gps/routing-qa/archive/master.zip"
243     #- wget -t 10 -O ~/yaml-tests/yaml2.zip "https://github.com/zoff99/routing-qa/archive/master.zip"
244 zoff99 51 #- wget -t 10 -O ~/yaml-tests/yaml1.zip "https://github.com/zoff99/routing-qa/archive/search-test001.zip"
245     - wget -t 10 -O ~/yaml-tests/yaml1.zip "https://github.com/zoff99/routing-qa/archive/turn_tests_001.zip"
246 zoff99 50 - cd ~/yaml-tests/ && unzip yaml1.zip && cd ~/ ; exit 0
247     - cd ~/yaml-tests/ && mv routing-qa-search-test001 routing-qa-master && cd ~/ ; exit 0
248 zoff99 51 - cd ~/yaml-tests/ && mv routing-qa-turn_tests_001 routing-qa-master && cd ~/ ; exit 0
249 zoff99 50 - cd ~/yaml-tests/ && unzip yaml2.zip && cd ~/ ; exit 0
250     - fb-adb shell "mkdir -p $sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps/../../debug/../yamltests/" ; exit 0
251    
252     # delete test files that give errors, for now *!*!
253     - cd ~/yaml-tests/routing-qa-master/ ; rm -v 002_missing_destination_name.yaml 003_highway_entrance.yaml 004_turn_restriction.yaml 005_car_forbidden_traffic.yaml Aalter_straight.yaml B2R_W.yaml Brugge.yaml Emmeloord_N.yaml Hamburg_Sued_S.yaml ; exit 0
254     - cd ~/yaml-tests/routing-qa-master/ ; rm -v Ichostrasse_S.yaml Imst_A12_E.yaml Imst_A12_W.yaml OSRM_issue_1645.yaml Oakland_highway_entrance.yaml RTE_Drongen_Deinze.yaml RTE_OSRM_issue_1794.yaml RTE_Tonisberg_1.yaml Sint-Niklaas.yaml no_HOV_1.yaml no_right_turn.yaml ; exit 0
255     - cd ~/yaml-tests/routing-qa-master/ ; rm -v A92.yaml Aalter_left.yaml Boulevard_Peripherique_1.yaml Ichostrasse_SE.yaml Vievis.yaml ; exit 0
256     - cd ~/
257     # delete test files that give errors, for now *!*!
258    
259     - for i in `ls -1 ~/yaml-tests/routing-qa-master/*.yaml` ; do fb-adb push "$i" "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps/../../debug/../yamltests/" ; done
260    
261     - fb-adb shell "mkdir -p $sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps/" ; exit 0
262     #- fb-adb shell "ls -al $sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/" ; exit 0
263    
264     - fb-adb shell "cat /proc/meminfo" ; exit 0
265    
266     #- fb-adb push -p ~/navitmap_001.bin "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps/"
267    
268     - adb install $CIRCLE_ARTIFACTS/zanavi_circleci_$CIRCLE_SHA1.apk
269    
270 zoff99 51
271 zoff99 50 - fb-adb shell am start -n com.zoffcc.applications.zanavi/com.zoffcc.applications.zanavi.Navit
272     #- fb-adb shell "ls -alR $sdpath/Android/data/com.zoffcc.applications.zanavi/" ; exit 0
273     - sleep 38
274     - fb-adb shell am force-stop com.zoffcc.applications.zanavi
275     - sleep 8
276     #- fb-adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/yamltests/ ; rm -Rf 201?-??-*"
277 zoff99 51 - fb-adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/yamltests/ ; ls -al " ; exit 0
278 zoff99 50 - fb-adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/yamltests/ ; rm 201?-??-*/* ; rmdir 201?-??-* " ; exit 0
279     - sleep 5
280     - fb-adb shell am start -n com.zoffcc.applications.zanavi/com.zoffcc.applications.zanavi.Navit
281    
282    
283     #- fb-adb shell "ls -al $sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps/" ; exit 0
284     #- mdir -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps"
285    
286     - adb logcat -v time > $CIRCLE_ARTIFACTS/adb_out.txt 2>&1 :
287     background: true
288    
289    
290 zoff99 51 - sleep 120 # let app startup , it takes a while on the emulator
291    
292    
293 zoff99 50 # ---------- waiting for tests to complete -------------
294     # ---------- waiting for tests to complete -------------
295     # ---------- waiting for tests to complete -------------
296     # ---------- waiting for tests to complete -------------
297     - rm -fv ~/_done_.txt ; exit 0
298 zoff99 51
299 zoff99 50 - ready_="0" ;
300     count_files=`ls -1 ~/yaml-tests/routing-qa-master/*.yaml|wc -l|tr -d " "` ;
301 zoff99 51 counter=0;
302 zoff99 50 while [ $ready_ == "0" ]; do
303     echo -n "running tests " ;
304 zoff99 51 counter=$[ $counter + 1 ] ;
305     if [ $counter -eq 38 ] ; then exit 0 ; fi ;
306     emu=`adb devices|grep -v 'List of devices attached'|grep -v '^$'|wc -l|tr -d ' '` ; if [ $emu -eq 0 ]; then echo "emulator crashed" ; ready_="1" ; fi ;
307 zoff99 50 n=`cat $CIRCLE_ARTIFACTS/adb_out.txt | grep ".yaml" | grep "file=" | wc -l` ;
308     echo "$n" "/" "$count_files" ;
309     adb pull "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/yamltests/_XX_XX_SUMMARY_XX_XX_.txt" ~/_done_.txt > /dev/null 2> /dev/null ;
310     died_count=`cat $CIRCLE_ARTIFACTS/adb_out.txt|grep 'com.zoffcc.applications.zanavi'|grep 'died'|wc -l|tr -d ' '` ;
311     if [ $died_count -gt 1 ]; then
312     echo "com.zoffcc.applications.zanavi crashed";
313     cat $CIRCLE_ARTIFACTS/adb_out.txt|grep '=MEM='|sed -e 's#.*ZANaviDebugReceiver:##' | tail -1 ;
314     ready_="1" ;
315     else cat $CIRCLE_ARTIFACTS/adb_out.txt|grep '=MEM='|sed -e 's#.*ZANaviDebugReceiver:##' |tail -1 ;
316     fi ;
317     if [ ! -f ~/_done_.txt ]; then
318 zoff99 51 import -window root $CIRCLE_ARTIFACTS/capture_tests_1_${counter}.png ;
319 zoff99 50 sleep 180 ;
320     else ready_="1" ;
321     fi ;
322     done ;
323     exit 0
324     # ---------- waiting for tests to complete -------------
325     # ---------- waiting for tests to complete -------------
326     # ---------- waiting for tests to complete -------------
327     # ---------- waiting for tests to complete -------------
328    
329 zoff99 51 # ---------- waiting for tests to complete -------------
330     # ---------- waiting for tests to complete -------------
331     # ---------- waiting for tests to complete -------------
332     # ---------- waiting for tests to complete -------------
333     - ready_="0" ;
334     count_files=`ls -1 ~/yaml-tests/routing-qa-master/*.yaml|wc -l|tr -d " "` ;
335     counter=0;
336     while [ $ready_ == "0" ]; do
337     echo -n "running tests " ;
338     counter=$[ $counter + 1 ] ;
339     if [ $counter -eq 38 ] ; then exit 0 ; fi ;
340     emu=`adb devices|grep -v 'List of devices attached'|grep -v '^$'|wc -l|tr -d ' '` ; if [ $emu -eq 0 ]; then echo "emulator crashed" ; ready_="1" ; fi ;
341     n=`cat $CIRCLE_ARTIFACTS/adb_out.txt | grep ".yaml" | grep "file=" | wc -l` ;
342     echo "$n" "/" "$count_files" ;
343     adb pull "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/yamltests/_XX_XX_SUMMARY_XX_XX_.txt" ~/_done_.txt > /dev/null 2> /dev/null ;
344     died_count=`cat $CIRCLE_ARTIFACTS/adb_out.txt|grep 'com.zoffcc.applications.zanavi'|grep 'died'|wc -l|tr -d ' '` ;
345     if [ $died_count -gt 1 ]; then
346     echo "com.zoffcc.applications.zanavi crashed";
347     cat $CIRCLE_ARTIFACTS/adb_out.txt|grep '=MEM='|sed -e 's#.*ZANaviDebugReceiver:##' | tail -1 ;
348     ready_="1" ;
349     else cat $CIRCLE_ARTIFACTS/adb_out.txt|grep '=MEM='|sed -e 's#.*ZANaviDebugReceiver:##' |tail -1 ;
350     fi ;
351     if [ ! -f ~/_done_.txt ]; then
352     import -window root $CIRCLE_ARTIFACTS/capture_tests_2_${counter}.png ;
353     sleep 180 ;
354     else ready_="1" ;
355     fi ;
356     done ;
357     exit 0
358     # ---------- waiting for tests to complete -------------
359     # ---------- waiting for tests to complete -------------
360     # ---------- waiting for tests to complete -------------
361     # ---------- waiting for tests to complete -------------
362 zoff99 50
363 zoff99 51
364 zoff99 50 - fb-adb shell am force-stop com.zoffcc.applications.zanavi
365     - sleep 20
366    
367     - fb-adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/yamltests/ ; ls -d 201?-??-*" > ~/tmp.txt && _dir=`cat ~/tmp.txt`; echo $_dir
368    
369    
370 zoff99 51 - fb-adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps/../../debug/ ; ls -al" ; exit 0
371     - mkdir ~/debug_output/ && cd ~/debug_output/ && fb-adb pull -p "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps/../../debug/" ; exit 0
372     - ls -al ~/debug_output/ ; exit 0
373    
374     - mkdir ~/debug_results/ ; exit 0
375     - ls -al ~/debug_results/
376     - _dir=`cat ~/tmp.txt` ; cd ~/debug_results/ && fb-adb pull -p "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/yamltests/$_dir/"
377     - ls -al ~/debug_results/
378    
379 zoff99 50 - mkdir ~/debug_summary/ && cd ~/debug_summary/ && fb-adb pull -p "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/yamltests/_XX_XX_SUMMARY_XX_XX_.txt"
380     - cd ~/debug_summary/ && fb-adb pull -p "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/yamltests/_XX_XX_DURATION_XX_XX_.txt"
381    
382     - mkdir -p ~/gpx2png/out
383     - mkdir -p ~/gpx2png/temp
384     - cd ~/gpx2png/
385 zoff99 51 - wget -O ~/gpx2png/gpx2png.pl 'https://raw.githubusercontent.com/zoff99/gpx2png_perl/75abd95444385816e14c222272d971c5ac93fe2d/gpx2png.pl'
386 zoff99 50 - chmod u+x ~/gpx2png/gpx2png.pl
387     - cd ~/gpx2png/temp/
388 zoff99 51 - for i in `ls -1 ~/debug_results/*.gpx`; do f=`basename "$i" \.gpx`; perl ~/gpx2png/gpx2png.pl -o ~/gpx2png/out/"$f""_GPX_.png" "$i"; cp -av ~/gpx2png/out/"$f""_GPX_.png" ~/debug_output/; done ; exit 0
389 zoff99 50 - cp -av ~/yaml-tests/routing-qa-master/*.yaml $CIRCLE_TEST_REPORTS/
390    
391    
392    
393     - pkill -9 -u ubuntu -f emulator64-arm
394    
395    
396 zoff99 51 #- Xvfb :2 -screen 0 1920x1080x24 -nolisten tcp :
397     # background: true
398    
399     - ps auxwww ; exit 0
400    
401 zoff99 50 - rm -Rf ~/.mozilla ; exit 0
402     - sleep 1
403 zoff99 51 - nohup firefox --setDefaultBrowser :
404 zoff99 50 background: true
405 zoff99 51 - sleep 20
406 zoff99 50
407 zoff99 51 - ps auxwww ; exit 0
408    
409 zoff99 50 - pkill -9 -u ubuntu -f firefox
410 zoff99 51 - type -a firefox
411 zoff99 50
412 zoff99 51 - ps auxwww ; exit 0
413    
414 zoff99 50 - cd ~/.mozilla/firefox/*default/ ; echo 'user_pref("browser.link.open_newwindow.override.external", 1);' >> prefs.js ; echo 'user_pref("browser.link.open_newwindow", 1);' >> prefs.js ; echo 'user_pref("browser.shell.checkDefaultBrowser", false);' >> prefs.js ; echo 'user_pref("app.update.enabled", false);' >> prefs.js
415 zoff99 51 - nohup firefox --setDefaultBrowser 'http://www.google.com/maps/dir/47.53916,19.04749/47.53986,19.04499' > $CIRCLE_ARTIFACTS/firefox_out.txt 2>&1 :
416 zoff99 50 background: true
417 zoff99 51 - sleep 20
418    
419     - ps auxwww ; exit 0
420    
421     # - xdotool search --name "Mozilla Firefox" windowsize 1900 1060 # too big for screen now
422     - xdotool search --name "Mozilla Firefox" windowsize 1280 900
423     - xdotool search --name "Mozilla Firefox" windowsize 1280 900
424 zoff99 50 - sleep 2
425    
426 zoff99 51 - _dir=`cat ~/tmp.txt` ; for i in `ls -1 ~/debug_results/*._SUCCESS_.result.txt`; do
427 zoff99 50 echo "file=$i";
428     url1=`cat "$i"|grep 'URL1'|cut -d":" -f2-` ; echo "$url1" ;
429     url2=`cat "$i"|grep 'URL2'|cut -d":" -f2-` ; echo "$url2" ;
430     url3=`cat "$i"|grep 'URL3'|cut -d":" -f2-`'/am=t/data=!3m1!4b1!4m2!4m1!3e0' ; echo "$url3" ;
431 zoff99 51 url3_orig=`cat "$i"|grep 'URL3'|cut -d":" -f2-` ;
432 zoff99 50 if [ "$url1""x" != "x" ]; then
433 zoff99 51 firefox --setDefaultBrowser "$url1" >/dev/null 2>/dev/null ;
434     sleep 10;
435     import -window root ~/capture001.png ;
436 zoff99 50 out=`basename "$i" \.txt`;
437 zoff99 51 cp -v ~/capture001.png ~/debug_results/"$out"._URL1_.png ;
438 zoff99 50 rm -fv ~/capture001.png ;
439 zoff99 51 fi ;
440     if [ "$url2""x" != "x" ]; then
441     firefox --setDefaultBrowser "$url2" >/dev/null 2>/dev/null ;
442     sleep 10;
443     import -window root ~/capture001.png ;
444 zoff99 50 out=`basename "$i" \.txt`;
445 zoff99 51 cp -v ~/capture001.png ~/debug_results/"$out"._URL2_.png ;
446 zoff99 50 rm -fv ~/capture001.png ;
447 zoff99 51 fi ;
448     if [ "$url3_orig""x" != "x" ]; then
449     firefox --setDefaultBrowser "$url3" >/dev/null 2>/dev/null ;
450     sleep 10;
451     import -window root ~/capture001.png ;
452 zoff99 50 out=`basename "$i" \.txt`;
453 zoff99 51 cp -v ~/capture001.png ~/debug_results/"$out"._URL3_.png ;
454 zoff99 50 rm -fv ~/capture001.png ;
455     fi ;
456     done ;
457     exit 0
458    
459     - pkill -9 -u ubuntu -f firefox
460    
461 zoff99 51 - cd ~/debug_results/ && cp -av * $CIRCLE_TEST_REPORTS/
462 zoff99 50 - cd ~/debug_output/ && mkdir -p $CIRCLE_TEST_REPORTS/ && cp -av ./* $CIRCLE_TEST_REPORTS/ ; exit 0
463     - cd ~/debug_summary/ && mkdir -p $CIRCLE_TEST_REPORTS/0000__reports/ && cp -av ./* $CIRCLE_TEST_REPORTS/0000__reports/
464    
465     - cat ~/debug_summary/_XX_XX_SUMMARY_XX_XX_.txt
466     - cat ~/debug_summary/_XX_XX_DURATION_XX_XX_.txt
467    
468     # -- count erros ----------------------------------
469     # -- count erros ----------------------------------
470     - mkdir -p $CIRCLE_TEST_REPORTS/0000__zanavi-runner/
471    
472     - ju_fail=0 ; _dir=`cat ~/tmp.txt` ; count_files=`ls -1 ~/yaml-tests/routing-qa-master/*.yaml|wc -l|tr -d " "` ;
473 zoff99 51 echo $count_files ; cd ~ ; ls -al ./debug_results/ ; cd ~/yaml-tests/routing-qa-master/ ;
474 zoff99 50 for i in `ls -1 *.yaml` ;
475 zoff99 51 do f="./debug_results/$i"'._SUCCESS_.result.txt' ; cd ~ ; echo "f=""$f" ;
476 zoff99 50 ls -al "$f" ; if [ -f "$f" ]; then echo "OK" ; else echo "FAIL" ; ju_fail=$[ $ju_fail + 1 ] ; fi ;
477     done ;
478     . ~/zanavi/ci/junit_start.sh ~/ju_res.xml "$count_files" "$ju_fail" ;
479     cd ~/yaml-tests/routing-qa-master/ ;
480     for i in `ls -1 *.yaml` ;
481 zoff99 51 do f="./debug_results/$i"'._SUCCESS_.result.txt' ; cd ~ ;
482 zoff99 50 rtime=`cat ~/debug_summary/_XX_XX_DURATION_XX_XX_.txt | grep "$i" 2> /dev/null | cut -d":" -f2 2>/dev/null | tr -d " " 2>/dev/null` ;
483     if [ -f "$f" ]; then echo "OK2" ;
484     ls -al "$f" ; . ~/zanavi/ci/junit_add.sh ~/ju_res.xml 0 "$i" "status" "OK" "$rtime"; else echo "FAIL2" ;
485     . ~/zanavi/ci/junit_add.sh ~/ju_res.xml 1 "$i" "status" "FAILED" "$rtime"; fi ;
486     done ;
487     . ~/zanavi/ci/junit_end.sh ~/ju_res.xml ; exit 0
488    
489     - cp -v ~/ju_res.xml $CIRCLE_TEST_REPORTS/0000__zanavi-runner/tests.xml
490     # -- count erros ----------------------------------
491     # -- count erros ----------------------------------
492    
493 zoff99 51 - cat $CIRCLE_ARTIFACTS/adb_out.txt |grep -e 'progress_handler:msg:10' -e '\.yaml' -e 'search params' -e 'No Results found'|grep -v 'title=getting search results' ; exit 0
494    
495 zoff99 50 #- cd ~/debug_results/ && zip results.zip ../debug_output/* ../debug_summary/* 201?-??-*/* ~/yaml-tests/routing-qa-master/*.yaml && mkdir -p $CIRCLE_TEST_REPORTS/0000__packed/ && cp -av results.zip $CIRCLE_TEST_REPORTS/0000__packed/
496     - cd $CIRCLE_TEST_REPORTS/ && zip -r ~/results.zip * && mkdir -p $CIRCLE_TEST_REPORTS/0000__packed/ && cp -av ~/results.zip $CIRCLE_TEST_REPORTS/0000__packed/
497    
498     # throw error if some tests failed
499     - cat ~/debug_summary/_XX_XX_SUMMARY_XX_XX_.txt | grep 'RES:ERR' ; ex=$? ; ex2=$[ 1 - $ex ] ; exit $ex2
500    
501     # throw error if count of tests <> count of yaml files
502     - count_done=`cat ~/debug_summary/_XX_XX_SUMMARY_XX_XX_.txt | grep 'tests:' | cut -d ':' -f 2 | tr -d " "` ; count_files=`ls -1 ~/yaml-tests/routing-qa-master/*.yaml|wc -l|tr -d " "` ; if [ $count_done != $count_files ]; then echo "COUNT ERR"; exit 1 ; else echo "COUNT OK" ; fi
503    
504     # ------ kill ----------------
505     #- ps -fu ubuntu
506     #- adb -s emulator-5555 emu kill ; exit 0
507     #- adb -s emulator-5554 emu kill ; exit 0
508     #- ps -fu ubuntu
509     #- sleep 10
510     #- pkill -9 -u ubuntu -f java
511     #- sleep 10
512     #- ps -fu ubuntu
513     # ------ kill ----------------
514    
515    
516 zoff99 51

   
Visit the ZANavi Wiki