/[zanavi_public1]/navit/circle.yml
ZANavi

Contents of /navit/circle.yml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 59 - (show annotations) (download)
Sat Jun 3 12:38:27 2017 UTC (15 months, 2 weeks ago) by zoff99
File size: 58178 byte(s)
v2.0.57a
1 machine:
2 timezone:
3 Europe/Berlin
4 java:
5 version: oraclejdk8
6 environment:
7 ###############################
8 # run emulator on this API [09,10,14,21,23,24]
9 #
10 EMU_09: "zanavi09"
11 EMU_10: "zanavi10"
12 EMU_14: "zanavi14"
13 EMU_21: "zanavi21"
14 EMU_23: "zanavi23"
15 EMU_24: "zanavi24"
16 sdpath_09: "/mnt/sdcard"
17 sdpath_10: "/mnt/sdcard"
18 sdpath_14: "/mnt/sdcard"
19 sdpath_21: "/sdcard"
20 sdpath_23: "/storage/eee"
21 sdpath_24: "/storage/eee"
22 #
23 EMU_API: "21"
24 ###############################
25
26 ###############################
27 # create new emu on every run:
28 #
29 # 0 -> NO
30 # 1 -> YES
31 #
32 _ALWAYS_NEW_EMU_: 0
33 ###############################
34
35 ###############################
36 # build type:
37 #
38 # 0 -> *not used now*
39 # 1 -> build
40 # 2 -> build + run
41 # 3 -> build + run + tests
42 #
43 _BUILD_TYPE_: 1
44 ###############################
45
46 ###############################
47 # video:
48 #
49 # 0 -> no
50 # 1 -> yes
51 #
52 _VIDEO_: 0
53 ###############################
54
55
56 ###### custom 2 ######
57 GRADLE_HOME: ~/g/gradle-custom
58 PATH: ~/g/gradle-custom/bin:$PATH
59 #
60 # GRADLE_CUSTOM_VERSION -> [0, 1]
61 # GRADLE_CUSTOM_VNUM -> what version?
62 #
63 GRADLE_CUSTOM_VERSION: 1
64 GRADLE_CUSTOM_VNUM: 3.1
65 # ANDROID_DAILY_OVERRIDE: "d349fb0bfb70be0d783e6c79454a5ceb276095ed"
66 ###### custom 2 ######
67
68 ###### custom 3 ######
69 CLASS_P: com.zoffcc.applications.zanavi
70 START_INTENT_P: .Navit
71 # switch glibc to a memory conserving mode
72 # MALLOC_ARENA_MAX: "2"
73 ###### custom 3 ######
74
75 ###############################
76 # 0 -> no
77 # 1 -> C
78 # 2 -> Java
79 #
80 COVERITY_BUILD_: 0
81 COV_PROJ: zoff99%2Fzanavi
82 ###############################
83
84 ANDROID_HOME: /usr/local/android-sdk-linux
85 ANDROID_SDK: /usr/local/android-sdk-linux/
86 _SDK_: /usr/local/android-sdk-linux/
87 GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx1600m -XX:+HeapDumpOnOutOfMemoryError" -Dorg.gradle.daemon=false'
88 MOZ_CRASHREPORTER_DISABLE: 1
89 FULL_LOG: 1
90
91 dependencies:
92 cache_directories:
93 - ~/.android
94 - ~/.gradle
95 # - ~/maps
96 pre:
97
98 ### ------- DO NOT EDIT -------
99 ### ------- scripts for _BUILD_TYPE_ type check -------
100 - echo 'if [ $_BUILD_TYPE_ -lt 1 ]; then echo "=BT=:SKIP [""$_BUILD_TYPE_""]" ; exit 0 ; else echo "=BT=:""$_BUILD_TYPE_" ; fi' > ~/_bt1 ; chmod a+rx ~/_bt1
101 - echo 'if [ $_BUILD_TYPE_ -lt 2 ]; then echo "=BT=:SKIP [""$_BUILD_TYPE_""]" ; exit 0 ; else echo "=BT=:""$_BUILD_TYPE_" ; fi' > ~/_bt2 ; chmod a+rx ~/_bt2
102 - echo 'if [ $_BUILD_TYPE_ -lt 3 ]; then echo "=BT=:SKIP [""$_BUILD_TYPE_""]" ; exit 0 ; else echo "=BT=:""$_BUILD_TYPE_" ; fi' > ~/_bt3 ; chmod a+rx ~/_bt3
103
104 - echo 'if [ $_BUILD_TYPE_ -gt 1 ]; then echo "=BT=:SKIP [""$_BUILD_TYPE_""]" ; exit 0 ; else echo "=BT=:""$_BUILD_TYPE_" ; fi' > ~/_xbt1 ; chmod a+rx ~/_xbt1
105 - echo 'if [ $_BUILD_TYPE_ -gt 2 ]; then echo "=BT=:SKIP [""$_BUILD_TYPE_""]" ; exit 0 ; else echo "=BT=:""$_BUILD_TYPE_" ; fi' > ~/_xbt2 ; chmod a+rx ~/_xbt2
106 - echo 'if [ $_BUILD_TYPE_ -gt 3 ]; then echo "=BT=:SKIP [""$_BUILD_TYPE_""]" ; exit 0 ; else echo "=BT=:""$_BUILD_TYPE_" ; fi' > ~/_xbt3 ; chmod a+rx ~/_xbt3
107
108 - wget 'https://raw.githubusercontent.com/zoff99/android_sdk_install_wrapper/master/__sdk_update__.sh' -O ~/__sdk_update__.sh
109 - chmod a+rx ~/__sdk_update__.sh
110
111 - printf '#! /bin/bash\n pgrep -l "$1"\n kill -9 $(pgrep "$1" | grep -v ^$$\$)\n pgrep -l -f "$1"\n' > ~/pkill2.sh
112 - chmod a+rx ~/pkill2.sh
113 ### ------- scripts for _BUILD_TYPE_ type check -------
114 ### ------- DO NOT EDIT -------
115
116 - sudo apt-get update #> /dev/null 2> /dev/null
117 - sudo apt-get install libpng12-dev #> /dev/null 2> /dev/null
118 - sudo apt-get install g++ #> /dev/null 2> /dev/null
119 - sudo apt-get install gettext #> /dev/null 2> /dev/null
120 - sudo apt-get install libsaxonb-java #> /dev/null 2> /dev/null
121 - sudo apt-get install lib32stdc++6 #> /dev/null 2> /dev/null
122 - sudo apt-get install lib32z1 #> /dev/null 2> /dev/null
123 - sudo apt-get install zip #> /dev/null 2> /dev/null
124 - sudo apt-get install bc #> /dev/null 2> /dev/null
125 - sudo apt-get install mtools #> /dev/null 2> /dev/null
126 - sudo apt-get install libmagickcore5 ; exit 0
127 - sudo apt-get install perlmagick ; exit 0
128 - sudo apt-get install liblwp-useragent-determined-perl #> /dev/null 2> /dev/null
129 - . ~/_bt3;sudo apt-get install xvfb #> /dev/null 2> /dev/null
130 - . ~/_bt3;sudo apt-get install xdotool #> /dev/null 2> /dev/null
131 - sudo apt-get install autoconf #> /dev/null 2> /dev/null
132 - sudo apt-get install telnet #> /dev/null 2> /dev/null
133 - . ~/_bt3;sudo apt-get install x11-utils #> /dev/null 2> /dev/null
134 - . ~/_bt3;sudo apt-get install xvkbd #> /dev/null 2> /dev/null
135 - sudo apt-get install qrencode #> /dev/null 2> /dev/null
136 - . ~/_bt3;sudo apt-get install firefox
137
138 - sudo apt-get install libav-tools #> /dev/null 2> /dev/null
139
140 - gradle -v # display gradle version
141 - if [ "$GRADLE_CUSTOM_VERSION""x" == "1x" ]; then cd ~ ; wget 'https://services.gradle.org/distributions/gradle-'"$GRADLE_CUSTOM_VNUM"'-bin.zip' ; fi
142 - if [ "$GRADLE_CUSTOM_VERSION""x" == "1x" ]; then mkdir ~/g ; cd ~/g ; unzip ~/gradle-"$GRADLE_CUSTOM_VNUM"-bin.zip ; fi
143 - if [ "$GRADLE_CUSTOM_VERSION""x" == "1x" ]; then cd ~/g ; mv -v ./gradle-"$GRADLE_CUSTOM_VNUM" ./gradle-custom ; fi
144 - gradle -v # display gradle version
145
146 - echo y | android update sdk --no-ui --all --filter "tools"
147 - android list sdk --all | grep -i tools
148 - android list sdk --all --extended
149
150 - ~/__sdk_update__.sh build-tools-22.0.0
151 - ~/__sdk_update__.sh build-tools-22.0.1
152 - ~/__sdk_update__.sh build-tools-23.0.1
153 - ~/__sdk_update__.sh build-tools-23.0.2
154 - ~/__sdk_update__.sh build-tools-23.0.3
155 - ~/__sdk_update__.sh build-tools-24.0.0
156 - ~/__sdk_update__.sh build-tools-24.0.2
157 - echo y | android update sdk --no-ui --all --filter build-tools-24.0.3 # license
158 # - ~/__sdk_update__.sh android-7
159 # - ~/__sdk_update__.sh android-14
160 # - ~/__sdk_update__.sh android-19
161 - ~/__sdk_update__.sh android-21
162 - ~/__sdk_update__.sh android-22
163 - ~/__sdk_update__.sh android-23
164 - ~/__sdk_update__.sh android-24
165 # - ~/__sdk_update__.sh sys-img-armeabi-v7a-android-14
166 # - ~/__sdk_update__.sh sys-img-armeabi-v7a-android-19
167 - ~/__sdk_update__.sh sys-img-armeabi-v7a-android-21
168 # - ~/__sdk_update__.sh sys-img-armeabi-v7a-android-23
169 - echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-23 ; exit 0
170 - echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-24 ; exit 0
171 - echo y | android update sdk --no-ui --all --filter platform-tools
172 - . ~/_bt2;echo y | android update sdk --no-ui --all --filter extra-android-m2repository #> /dev/null 2> /dev/null
173 - . ~/_bt2;echo y | android update sdk --no-ui --all --filter extra-google-m2repository #> /dev/null 2> /dev/null
174 - . ~/_bt2;echo y | android update sdk --no-ui --all --filter extra-android-support #> /dev/null 2> /dev/null
175
176 # ------- install missing NDK ----------
177 - wget -O ~/zandroid-ndk.sh 'https://raw.githubusercontent.com/zoff99/circleCI_android_template/master/android-ndk.sh'
178 - printf 'export NDK_VERSION=r10d\n. ~/zandroid-ndk.sh && install_android_ndk\n' | sudo bash
179 # ------- install missing NDK ----------
180
181 - if [ "$COVERITY_BUILD_""x" == "1x" ]; then mkdir ~/cov_scan/ && wget 'https://scan.coverity.com/download/linux-64' --post-data "token=$COVERITY_TOKEN&project=$COV_PROJ" -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
182
183 - pwd ; ls -al
184
185 - . ~/_bt3;if [ "$EMU_API""x" == "24x" ]; then cat ~/"$CIRCLE_PROJECT_REPONAME"/navit/android/src/com/zoffcc/applications/zanavi/Navit.java | grep 'storage_directory", ' ; fi
186 - . ~/_bt3;if [ "$EMU_API""x" == "24x" ]; then sed -i -e 's#prefs.getString("storage_directory", "-1"#prefs.getString("storage_directory", "1"#' ~/"$CIRCLE_PROJECT_REPONAME"/navit/android/src/com/zoffcc/applications/zanavi/Navit.java ; fi
187 - . ~/_bt3;if [ "$EMU_API""x" == "24x" ]; then cat ~/"$CIRCLE_PROJECT_REPONAME"/navit/android/src/com/zoffcc/applications/zanavi/Navit.java | grep 'storage_directory", ' ; fi
188
189 - . ~/_bt3;if [ "$EMU_API""x" == "23x" ]; then cat ~/"$CIRCLE_PROJECT_REPONAME"/navit/android/src/com/zoffcc/applications/zanavi/Navit.java | grep 'storage_directory", ' ; fi
190 - . ~/_bt3;if [ "$EMU_API""x" == "23x" ]; then sed -i -e 's#prefs.getString("storage_directory", "-1"#prefs.getString("storage_directory", "1"#' ~/"$CIRCLE_PROJECT_REPONAME"/navit/android/src/com/zoffcc/applications/zanavi/Navit.java ; fi
191 - . ~/_bt3;if [ "$EMU_API""x" == "23x" ]; then cat ~/"$CIRCLE_PROJECT_REPONAME"/navit/android/src/com/zoffcc/applications/zanavi/Navit.java | grep 'storage_directory", ' ; fi
192
193
194 - . ~/_xbt2; cat ~/"$CIRCLE_PROJECT_REPONAME"/navit/android/src/com/zoffcc/applications/zanavi/Navit.java | grep ' -MAT-INTRO-'
195 - . ~/_xbt2; sed -i -e 's#if (Navit.CIDEBUG == 0) // -MAT-INTRO-#//if (Navit.CIDEBUG == 0) // -MAT-INTRO-#' ~/"$CIRCLE_PROJECT_REPONAME"/navit/android/src/com/zoffcc/applications/zanavi/Navit.java
196
197 - if [ ! -e ~/zanavi/ ]; then pwd; curdir=`pwd` ; ln -s "$curdir" ~/zanavi ; ls -al ; ls -al ~ ; fi
198
199 - . ~/_bt2;cd ~/zanavi ;ls -al navit/android/src/com/zoffcc/applications/zanavi/Navit.java
200 - . ~/_bt2;cd ~/zanavi ;sed -i -e 's#static final boolean CI_ALLOWCRASHREPORTS.*#static final boolean CI_ALLOWCRASHREPORTS = false;#' navit/android/src/com/zoffcc/applications/zanavi/Navit.java
201 - . ~/_bt2;cd ~/zanavi ;cat navit/android/src/com/zoffcc/applications/zanavi/Navit.java | grep 'final boolean CI_ALLOWCRASHREPORTS'
202 - . ~/_bt2;cd ~/zanavi ;ls -al navit/android/src/com/zoffcc/applications/zanavi/Navit.java
203
204 - . ~/_bt3;cd ~/zanavi ;ls -al navit/android/src/com/zoffcc/applications/zanavi/Navit.java
205 - . ~/_bt3;cd ~/zanavi ;sed -i -e 's#static final int CIDEBUG =.*#static final int CIDEBUG = 1;#' navit/android/src/com/zoffcc/applications/zanavi/Navit.java
206 - . ~/_bt3;cd ~/zanavi ;cat navit/android/src/com/zoffcc/applications/zanavi/Navit.java | grep 'static final int CIDEBUG'
207 - . ~/_bt3;cd ~/zanavi ;ls -al navit/android/src/com/zoffcc/applications/zanavi/Navit.java
208
209 - . ~/_bt3;cd ~/zanavi ;ls -al navit/debug.h
210 - . ~/_bt3;cd ~/zanavi ;sed -i -e 'sc// \#define _CIDEBUG_BUILD_ 1c\#define _CIDEBUG_BUILD_ 1c' navit/debug.h
211 - . ~/_bt3;cd ~/zanavi ;cat navit/debug.h | grep 'CIDEBUG_BUILD'
212 - . ~/_bt3;cd ~/zanavi ;ls -al navit/debug.h
213
214
215 ##### ------------ BUILD ------------
216 ## ----- GRADLE -----
217 - bash -c 'chmod a+rx ~/zanavi/ci/do_android_gradle.sh ; cd ~/ ; ~/zanavi/ci/do_android_gradle.sh'
218 - ps aux
219 - cd ~/android-build/navit ; if [ "$GRADLE_CUSTOM_VERSION""x" == "1x" ]; then gradle wrapper --no-daemon --gradle-version "$GRADLE_CUSTOM_VNUM" --info ; else gradle wrapper --no-daemon --info ; fi ; exit 0
220 - ps aux
221 - mkdir $CIRCLE_ARTIFACTS/gradle_wrapper ; exit 0
222 - cd ~/android-build/navit ; cp -av gradle gradlew gradlew.bat $CIRCLE_ARTIFACTS/gradle_wrapper/ ; exit 0
223 - cd ~/android-build/navit ; gradle -q :android:dependencies --no-daemon ; exit 0
224 - ps aux
225 - cd ~/android-build/navit ; gradle :android:lint --no-daemon --info ; exit 0
226 - find ../ -name 'lint-results*.html'; exit 0
227 - find ../ -name 'lint-results*.html' 2> /dev/null ; exit 0
228 - find ../ -name 'lint-results*.html' 2> /dev/null | tail -1 2> /dev/null ; exit 0
229 - cp -v `find ../ -name 'lint-results*.html' 2> /dev/null | tail -1 2> /dev/null` $CIRCLE_ARTIFACTS/lint-001.html ; exit 0
230 - cat /home/ubuntu/android-build/navit/android/build/reports/lint/lint-result.html ; exit 0
231 - cp -v /home/ubuntu/android-build/navit/android/build/reports/lint/lint-result.html $CIRCLE_ARTIFACTS/ ; exit 0
232 # - cd ~/android-build/navit ; ./gradlew check --no-daemon --info ; exit 0
233 - ps aux
234 - cd ~/android-build/navit ; ./gradlew tasks --no-daemon ; exit 0
235 - ps aux
236 - cd ~/android-build/navit ; ./gradlew :android:assembleRelease --stacktrace --info --no-daemon -x lint
237 - ps aux
238 ## ----- GRADLE -----
239
240 # ------ create files for android studio project -------------
241 - cd ~/android-build/navit ; du -hs .
242 - rm -f /tmp/and_std_zipfiles.txt
243 - echo 'navit/android/res/raw/' >> /tmp/and_std_zipfiles.txt
244 - echo 'navit/android/AndroidManifest.xml' >> /tmp/and_std_zipfiles.txt
245 - echo 'navit/android/nativelibs/' >> /tmp/and_std_zipfiles.txt
246 - cd ~/android-build ; cat /tmp/and_std_zipfiles.txt | zip -r $CIRCLE_ARTIFACTS/android-studio-project.zip -@
247 - ls -hal $CIRCLE_ARTIFACTS/android-studio-project.zip
248 # ------ create files for android studio project -------------
249
250
251
252 - find ../ -name '*.apk' ; exit 0
253 ##### ------------ BUILD ------------
254
255
256 ##### ------------ COPY APP to standard DIR ------------
257 - mkdir -p app/build/outputs/apk/
258 - cp -av `find ../ -name '*.apk' 2> /dev/null | tail -1 2> /dev/null` app/build/outputs/apk/app-debug-unaligned.apk
259 - /usr/local/android-sdk-linux/build-tools/23.0.2/aapt d permissions app/build/outputs/apk/app-debug-unaligned.apk ; exit 0
260 ##### ------------ COPY APP to standard DIR ------------
261
262 ##### ------------ COPY LIBS to ARTIFACTS DIR ----------
263 - zip -r $CIRCLE_ARTIFACTS/zanavi_binary_libs.zip ~/android-build/navit/android/nativelibs ; exit 0
264 - mkdir -p $CIRCLE_ARTIFACTS/libs/ ; exit 0
265 - cp -av ~/android-build/navit/android/nativelibs/* $CIRCLE_ARTIFACTS/libs/ ; exit 0
266 ##### ------------ COPY LIBS to ARTIFACTS DIR ----------
267
268 ##### ------------ COPY "raw" to ARTIFACTS DIR ---------
269 - zip -r $CIRCLE_ARTIFACTS/raw_dir.zip ~/android-build/navit/android/res/raw ; exit 0
270 - mkdir -p $CIRCLE_ARTIFACTS/raw_dir/ ; exit 0
271 - cp -av ~/android-build/navit/android/res/raw/* $CIRCLE_ARTIFACTS/raw_dir/ ; exit 0
272 ##### ------------ COPY "raw" to ARTIFACTS DIR ---------
273
274
275 ##### ------------ SIGN APP (again) and copy to ARTIFACTS DIR ------------
276 - zip -d app/build/outputs/apk/app-debug-unaligned.apk META-INF/\* ; exit 0 # remove signature (only if it's unsigned) !!
277 - cp -av app/build/outputs/apk/app-debug-unaligned.apk ~/app.apk
278 - cd ~/ ;
279 echo xxxxxxrm -f ~/.android/debug.keystore ;
280 ls -al ~/.android/debug.keystore ;
281 if [ ! -f ~/.android/debug.keystore ]; then echo "*** generating new signer key ***" ;
282 echo "*** generating new signer key ***";
283 echo "*** generating new signer key ***";
284 keytool -genkey -v -keystore ~/.android/debug.keystore -storepass android -keyalg RSA -keysize 2048 -validity 10000 -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US" ;
285 fi ;
286 ls -al ~/ ;
287 jarsigner -verbose -keystore ~/.android/debug.keystore -storepass android -keypass android -sigalg SHA1withRSA -digestalg SHA1 -sigfile CERT -signedjar app-signed.apk app.apk androiddebugkey ;
288 ls -al ~/ ;
289 $_SDK_/build-tools/23.0.1/zipalign -v 4 app-signed.apk app-signed-aligned.apk ;
290 ls -al ~/ ;
291 pwd ;
292 ls -al ;
293 cp -av app-signed-aligned.apk $CIRCLE_ARTIFACTS/${CIRCLE_PROJECT_REPONAME}_circleci_$CIRCLE_SHA1.apk || exit 1
294
295 - cp -av $CIRCLE_ARTIFACTS/${CIRCLE_PROJECT_REPONAME}_circleci_$CIRCLE_SHA1.apk $CIRCLE_ARTIFACTS/zanavi.apk ; exit 0 # standard name for link to latest version
296 ##### ------------ SIGN APP (again) and copy to ARTIFACTS DIR ------------
297
298
299 ##### ------------ GERNATE QR CODE ------------
300 - qrencode -o $CIRCLE_ARTIFACTS/QR_apk.png 'https://circle-artifacts.com/gh/'${CIRCLE_PROJECT_USERNAME}'/'${CIRCLE_PROJECT_REPONAME}'/'${CIRCLE_BUILD_NUM}'/artifacts/'${CIRCLE_NODE_INDEX}'/tmp/'`basename $CIRCLE_ARTIFACTS`'/'"${CIRCLE_PROJECT_REPONAME}_circleci_$CIRCLE_SHA1.apk" ; exit 0
301 - qrencode -o $CIRCLE_ARTIFACTS/QR_artifacts.png 'https://circleci.com/gh/'${CIRCLE_PROJECT_USERNAME}'/'${CIRCLE_PROJECT_REPONAME}'/'${CIRCLE_BUILD_NUM}'#artifacts' ; exit 0
302 ##### ------------ GERNATE QR CODE ------------
303
304
305 - ls -al /home/ubuntu/android-build/navit/.libs/lib_data_data_com.zoffcc.applications.zanavi_lib_navit.so ; exit 0
306 - ls -al /home/ubuntu/android-build/navit/.libs/navit2 ; exit 0
307 - ls -al /home/ubuntu/android-build/navit/navit2 ; exit 0
308 - if [ "$COVERITY_BUILD_""x" != "0x" ]; then ls -al /home/ubuntu/android-build/cov-int/ ; exit 0 ; fi
309 - if [ "$COVERITY_BUILD_""x" != "0x" ]; then cp -v /home/ubuntu/android-build/cov-int/build-log.txt $CIRCLE_ARTIFACTS/ ; fi
310 - if [ "$COVERITY_BUILD_""x" != "0x" ]; then cd /home/ubuntu/android-build/ ; tar -czvf $CIRCLE_ARTIFACTS/covint.tar.gz cov-int ; fi
311
312 - ls -al ~/maps/ ; exit 0
313 - mkdir -p ~/maps/ ; exit 0
314 - ls -al ~/maps/
315 - rm -f ~/_dl_error_.txt ; exit 0
316
317 ##### ---------- download script ----------
318 - echo '#! /bin/bash' > ~/download_my_file.sh
319 - echo 'url="$1" ; file=$2 ; touch_file=$3 ; tries=3 ; wait_=300 ; cur_try=0 ; while [ $cur_try -lt $tries ]; do cur_try=$[ $cur_try + 1 ] ; wget --no-check-certificate --retry-connrefused --wait=5 -c -t 100 -O $file "$url" ; res=$? ; if [ $res -eq 0 ]; then touch $touch_file ; exit 0 ; else sleep "$wait_" ; fi ; done ; touch ~/_dl_error_.txt' >> ~/download_my_file.sh
320 - chmod a+rx ~/download_my_file.sh
321 ##### ---------- download script ----------
322
323 - mkdir ~/_downloadmaps_/
324
325 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/france.bin' ~/maps/navitmap_001.bin ~/_downloadmaps_/001 :
326 background: true
327 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/germany.bin' ~/maps/navitmap_002.bin ~/_downloadmaps_/002 :
328 background: true
329 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/great_britain.bin' ~/maps/navitmap_003.bin ~/_downloadmaps_/003 :
330 background: true
331
332 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/austria.bin' ~/maps/navitmap_004.bin ~/_downloadmaps_/004 :
333 background: true
334 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/netherlands.bin' ~/maps/navitmap_005.bin ~/_downloadmaps_/005 :
335 background: true
336 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/belgium.bin' ~/maps/navitmap_006.bin ~/_downloadmaps_/006 :
337 background: true
338 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/italy.bin' ~/maps/navitmap_007.bin ~/_downloadmaps_/007 :
339 background: true
340 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/liechtenstein.bin' ~/maps/navitmap_008.bin ~/_downloadmaps_/008 :
341 background: true
342 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/luxembourg.bin' ~/maps/navitmap_009.bin ~/_downloadmaps_/009 :
343 background: true
344 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/switzerland.bin' ~/maps/navitmap_010.bin ~/_downloadmaps_/010 :
345 background: true
346 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/ireland.bin' ~/maps/navitmap_011.bin ~/_downloadmaps_/011 :
347 background: true
348
349 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/lithuania.bin' ~/maps/navitmap_012.bin ~/_downloadmaps_/012 :
350 background: true
351 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/poland.bin' ~/maps/navitmap_013.bin ~/_downloadmaps_/013 :
352 background: true
353 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/spain.bin' ~/maps/navitmap_014.bin ~/_downloadmaps_/014 :
354 background: true
355 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/portugal.bin' ~/maps/navitmap_015.bin ~/_downloadmaps_/015 :
356 background: true
357
358 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/us-midwest.bin' ~/maps/navitmap_016.bin ~/_downloadmaps_/016 :
359 background: true
360 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/us-northeast.bin' ~/maps/navitmap_017.bin ~/_downloadmaps_/017 :
361 background: true
362 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/us-pacific.bin' ~/maps/navitmap_018.bin ~/_downloadmaps_/018 :
363 background: true
364 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/us-south.bin' ~/maps/navitmap_019.bin ~/_downloadmaps_/019 :
365 background: true
366 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/us-west.bin' ~/maps/navitmap_020.bin ~/_downloadmaps_/020 :
367 background: true
368
369 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/central_america.bin' ~/maps/navitmap_021.bin ~/_downloadmaps_/021 :
370 background: true
371 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/south_america.bin' ~/maps/navitmap_022.bin ~/_downloadmaps_/022 :
372 background: true
373 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/africa.bin' ~/maps/navitmap_023.bin ~/_downloadmaps_/023 :
374 background: true
375 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/australia_oceania.bin' ~/maps/navitmap_024.bin ~/_downloadmaps_/024 :
376 background: true
377 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/andorra.bin' ~/maps/navitmap_025.bin ~/_downloadmaps_/025 :
378 background: true
379 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/belarus.bin' ~/maps/navitmap_026.bin ~/_downloadmaps_/026 :
380 background: true
381 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/bosnia-herzegovina.bin' ~/maps/navitmap_027.bin ~/_downloadmaps_/027 :
382 background: true
383 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/croatia.bin' ~/maps/navitmap_028.bin ~/_downloadmaps_/028 :
384 background: true
385 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/cyprus.bin' ~/maps/navitmap_029.bin ~/_downloadmaps_/029 :
386 background: true
387
388
389 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/czech_republic.bin' ~/maps/navitmap_030.bin ~/_downloadmaps_/030 :
390 background: true
391 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/estonia.bin' ~/maps/navitmap_031.bin ~/_downloadmaps_/031 :
392 background: true
393 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/hungary.bin' ~/maps/navitmap_032.bin ~/_downloadmaps_/032 :
394 background: true
395 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/greece.bin' ~/maps/navitmap_033.bin ~/_downloadmaps_/033 :
396 background: true
397 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/kosovo.bin' ~/maps/navitmap_034.bin ~/_downloadmaps_/034 :
398 background: true
399 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/macedonia.bin' ~/maps/navitmap_035.bin ~/_downloadmaps_/035 :
400 background: true
401 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/moldova.bin' ~/maps/navitmap_036.bin ~/_downloadmaps_/036 :
402 background: true
403 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/denmark.bin' ~/maps/navitmap_037.bin ~/_downloadmaps_/037 :
404 background: true
405 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/russia-european-part.bin' ~/maps/navitmap_038.bin ~/_downloadmaps_/038 :
406 background: true
407 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/serbia.bin' ~/maps/navitmap_039.bin ~/_downloadmaps_/039 :
408 background: true
409
410 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/slovakia.bin' ~/maps/navitmap_040.bin ~/_downloadmaps_/040 :
411 background: true
412 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/slovenia.bin' ~/maps/navitmap_041.bin ~/_downloadmaps_/041 :
413 background: true
414 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/sweden.bin' ~/maps/navitmap_042.bin ~/_downloadmaps_/042 :
415 background: true
416 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/turkey.bin' ~/maps/navitmap_043.bin ~/_downloadmaps_/043 :
417 background: true
418 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/cuba.bin' ~/maps/navitmap_044.bin ~/_downloadmaps_/044 :
419 background: true
420 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/canada.bin' ~/maps/navitmap_045.bin ~/_downloadmaps_/045 :
421 background: true
422 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/mexico.bin' ~/maps/navitmap_046.bin ~/_downloadmaps_/046 :
423 background: true
424
425 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/restl_welt.bin' ~/maps/navitmap_047.bin ~/_downloadmaps_/047 :
426 background: true
427 - . ~/_bt3; ~/download_my_file.sh 'http://ci.zanavi.cc/data/planet.bin.idx' ~/maps/navitmap_001.bin.idx ~/_downloadmaps_/i_001 :
428 background: true
429
430
431 - . ~/_bt3;files=48 ; have=0 ; while [ $have -lt $files ]; do if [ -e ~/_dl_error_.txt ]; then echo "ERROR while downloading" ; exit 1 ; else ls -al ~/_downloadmaps_/ ; have=`ls -1 ~/_downloadmaps_/|wc -l|tr -d " "` ; echo "have=""$have" ; sleep 30 ; fi ; done
432
433 - ls -al ~/*txt ; exit 0
434 - rm -fv ~/stdout_wget_*.txt ; rm -fv ~/stderr_wget_*.txt ; exit 0
435 - ls -al $CIRCLE_ARTIFACTS ; exit 0
436 - rm -fv $CIRCLE_ARTIFACTS/stdout_wget_*.txt ; rm -fv $CIRCLE_ARTIFACTS/stderr_wget_*.txt ; exit 0
437
438 test:
439 pre:
440 - . ~/_bt2;mksdcard -l e 18000M sdcard.img
441 - . ~/_bt2;echo 'mtools_skip_check=1' > ~/.mtoolsrc
442 - . ~/_bt2;android list targets
443
444 - . ~/_bt2; if [ "$_ALWAYS_NEW_EMU_""x" == "1x" ]; then ls -al ~/.android ; rm -Rf ~/.android/avd ; ls -al ~/.android ; fi
445
446 #
447 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; if [ "$EMU_" == "zanavi24" ]; then echo "no" | android create avd -n zanavi24 -f -t android-24 --abi default/armeabi-v7a --skin "WXGA720" ; fi
448 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; if [ "$EMU_" == "zanavi24" ]; then cat ~/.android/avd/zanavi24.avd/config.ini ; fi
449 #
450 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; if [ "$EMU_" == "zanavi23" ]; then echo "no" | android create avd -n zanavi23 -f -t android-23 --abi default/armeabi-v7a --skin "WXGA720" ; fi
451 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; if [ "$EMU_" == "zanavi23" ]; then cat ~/.android/avd/zanavi23.avd/config.ini ; fi
452 #
453 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; if [ "$EMU_" == "zanavi21" ]; then echo "no" | android create avd -n zanavi21 -f -t android-21 --abi default/armeabi-v7a --skin "WXGA720" ; fi
454 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; if [ "$EMU_" == "zanavi21" ]; then cat ~/.android/avd/zanavi21.avd/config.ini ; fi
455 #
456 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; if [ "$EMU_" == "zanavi14" ]; then echo "no" | android create avd -n zanavi14 -f -t android-14 --abi default/armeabi-v7a --skin "WXGA720" ; fi
457 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; if [ "$EMU_" == "zanavi14" ]; then cat ~/.android/avd/zanavi14.avd/config.ini ; fi
458 #
459 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; if [ "$EMU_" == "zanavi10" ]; then echo "no" | android create avd -n zanavi10 -f -t android-10 --abi default/armeabi --skin "WQVGA432" ; fi
460 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; if [ "$EMU_" == "zanavi10" ]; then cat ~/.android/avd/zanavi10.avd/config.ini ; fi
461 #
462 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; if [ "$EMU_" == "zanavi09" ]; then echo "no" | android create avd -n zanavi09 -f -t android-9 --abi default/armeabi --skin "WQVGA432" ; fi
463 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; if [ "$EMU_" == "zanavi09" ]; then cat ~/.android/avd/zanavi09.avd/config.ini ; fi
464 #
465
466 - cat ~/.android/avd/zanavi09.avd/config.ini ; exit 0
467 - cat ~/.android/avd/zanavi09.avd/config.ini | grep -v 'vm.heapSize' | grep -v 'hw.ramSize' > /tmp/zanavi09.avd_ini ; cp -v /tmp/zanavi09.avd_ini ~/.android/avd/zanavi09.avd/config.ini ; rm -f /tmp/zanavi09.avd_ini ; exit 0
468 - echo 'vm.heapSize=64' >> ~/.android/avd/zanavi09.avd/config.ini ; exit 0
469 - echo 'hw.ramSize=2048' >> ~/.android/avd/zanavi09.avd/config.ini ; exit 0
470 - cat ~/.android/avd/zanavi09.avd/config.ini | sort | uniq > /tmp/zanavi09.avd_ini ; cp -v /tmp/zanavi09.avd_ini ~/.android/avd/zanavi09.avd/config.ini ; rm -f /tmp/zanavi09.avd_ini ; exit 0
471 - cat ~/.android/avd/zanavi09.avd/config.ini | sort | uniq
472 - cat ~/.android/avd/zanavi09.avd/config.ini ; exit 0
473
474 - cat ~/.android/avd/zanavi24.avd/config.ini ; exit 0
475 - cat ~/.android/avd/zanavi24.avd/config.ini | grep -v 'vm.heapSize' | grep -v 'hw.ramSize' > /tmp/zanavi24.avd_ini ; cp -v /tmp/zanavi24.avd_ini ~/.android/avd/zanavi24.avd/config.ini ; rm -f /tmp/zanavi24.avd_ini ; exit 0
476 - echo 'vm.heapSize=64' >> ~/.android/avd/zanavi24.avd/config.ini ; exit 0
477 - echo 'hw.ramSize=2048' >> ~/.android/avd/zanavi24.avd/config.ini ; exit 0
478 - cat ~/.android/avd/zanavi24.avd/config.ini | sort | uniq > /tmp/zanavi24.avd_ini ; cp -v /tmp/zanavi24.avd_ini ~/.android/avd/zanavi24.avd/config.ini ; rm -f /tmp/zanavi24.avd_ini ; exit 0
479 - cat ~/.android/avd/zanavi24.avd/config.ini | sort | uniq
480 - cat ~/.android/avd/zanavi24.avd/config.ini ; exit 0
481
482 #
483 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; echo "$EMU_"
484 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; echo "$sdpath"
485
486 override:
487 - . ~/_bt2;ls -al ~/android-build/navit/android/bin/ ; exit 0
488 - . ~/_bt2;ls -al $CIRCLE_ARTIFACTS/
489
490 - . ~/_bt2;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
491
492 - . ~/_bt2;mmd -i ~/zanavi/sdcard.img "::Android"
493 - . ~/_bt2;mmd -i ~/zanavi/sdcard.img "::Android/data"
494 - . ~/_bt2;mmd -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi"
495 - . ~/_bt2;mmd -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files"
496 - . ~/_bt2;mmd -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files/zanavi"
497 - . ~/_bt2;mmd -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps"
498
499 - . ~/_bt2;mdir -i ~/zanavi/sdcard.img "::"
500 - . ~/_bt2;mdir -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps"
501
502 - . ~/_bt3;if [ "$EMU_API""x" != "24x" ]; then if [ "$EMU_API""x" != "23x" ]; then cd ~/maps/ ; mcopy -v -i ~/zanavi/sdcard.img navitmap_*.bin* "::Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps" ; fi ; fi
503
504 #- . ~/_bt3;if [ "$EMU_API""x" == "23x" ]; then cd ~/maps/ ; mcopy -v -i ~/zanavi/sdcard.img navitmap_*.bin* "::Android/data/com.zoffcc.applications.zanavi/files" ; fi
505 #- . ~/_bt3;if [ "$EMU_API""x" == "24x" ]; then cd ~/maps/ ; mcopy -v -i ~/zanavi/sdcard.img navitmap_*.bin* "::Android/data/com.zoffcc.applications.zanavi/files" ; fi
506
507
508 - . ~/_bt2;mdir -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps"
509 - . ~/_bt2;mdir -i ~/zanavi/sdcard.img "::Android/data/com.zoffcc.applications.zanavi/files"
510
511 - . ~/_bt2;import -window root $CIRCLE_ARTIFACTS/capture000a.png
512
513
514 # --------- capture screen ---------
515 - . ~/_bt2;sudo ln -sf /usr/bin/avconv /usr/bin/ffmpeg ; exit 0
516 - . ~/_bt2;if [ "$_VIDEO_" == "1x" ]; then timeout --signal=SIGKILL "70.0m" ffmpeg -f x11grab -s `xdpyinfo | grep 'dimensions:'|awk '{print $2}'` -r 20 -i "$DISPLAY" -preset veryfast -maxrate 250k -bufsize 1300k -vf "scale=1024:-1,format=yuv420p" $CIRCLE_ARTIFACTS/screen_capture_video.mpg >/dev/null 2>/dev/null ; fi :
517 background: true
518 # --------- capture screen ---------
519
520
521
522 - . ~/_bt2;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; emulator -avd "$EMU_" -sdcard sdcard.img :
523 background: true
524 parallel: true
525 - . ~/_bt2;circle-android wait-for-boot
526
527
528 - . ~/_bt2;xdotool search --class ''|xargs -L1 xdotool getwindowname|grep -v '^$'; xwininfo -root -tree -int
529 - . ~/_bt2;sleep 10
530
531 - . ~/_bt2;if [ "$EMU_API""x" == "24x" ]; then sleep 30 ; fi
532 - . ~/_bt2;if [ "$EMU_API""x" == "23x" ]; then sleep 30 ; fi
533 - . ~/_bt2;if [ "$EMU_API""x" == "09x" ]; then sleep 30 ; fi
534
535
536 - . ~/_bt2;adb shell input keyevent 82
537 - . ~/_bt2;sleep 10
538 - . ~/_bt2;import -window root $CIRCLE_ARTIFACTS/capture_emulator_running.png
539
540 - . ~/_bt2;if [ "$EMU_API""x" == "24x" ]; then printf 'su\nid\nls -al /storage/\nln -sf /storage/[0-9]* /storage/eee\nchgrp -h sdcard_rw /storage/eee\nls -al /storage/\nexit\nexit\n'|adb shell ; fi
541
542 - . ~/_bt2;if [ "$EMU_API""x" == "23x" ]; then printf 'su\nid\nls -al /storage/\nln -sf /storage/[0-9]* /storage/eee\nchgrp -h sdcard_rw /storage/eee\nls -al /storage/\nexit\nexit\n'|adb shell ; fi
543
544
545 - . ~/_bt2;mkdir ~/yaml-tests/
546 #- wget -t 10 -O ~/yaml-tests/yaml1.zip "https://github.com/navit-gps/routing-qa/archive/master.zip"
547 #- wget -t 10 -O ~/yaml-tests/yaml2.zip "https://github.com/zoff99/routing-qa/archive/master.zip"
548 #- wget -t 10 -O ~/yaml-tests/yaml1.zip "https://github.com/zoff99/routing-qa/archive/search-test001.zip"
549 - . ~/_bt3;wget -t 10 -O ~/yaml-tests/yaml1.zip "https://github.com/zoff99/routing-qa/archive/turn_tests_001.zip"
550 - . ~/_bt3;cd ~/yaml-tests/ && unzip yaml1.zip && cd ~/ ; exit 0
551 - . ~/_bt3;cd ~/yaml-tests/ && mv routing-qa-search-test001 routing-qa-master && cd ~/ ; exit 0
552 - . ~/_bt3;cd ~/yaml-tests/ && mv routing-qa-turn_tests_001 routing-qa-master && cd ~/ ; exit 0
553 - . ~/_bt3;cd ~/yaml-tests/ && unzip yaml2.zip && cd ~/ ; exit 0
554 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; adb shell "mkdir -p $sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/" ; exit 0
555
556 # delete test files that give errors, for now *!*!
557 - . ~/_bt3;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
558 - . ~/_bt3;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
559 - . ~/_bt3;cd ~/yaml-tests/routing-qa-master/ ; rm -v A92.yaml Aalter_left.yaml Boulevard_Peripherique_1.yaml Ichostrasse_SE.yaml Vievis.yaml ; exit 0
560 # delete test files that give errors, for now *!*!
561
562 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; for i in `ls -1 ~/yaml-tests/routing-qa-master/*.yaml` ; do adb push "$i" "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/" ; done
563
564 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; adb shell "mkdir -p $sdpath/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps" ; exit 0
565
566 # -------------- info --------------
567 - . ~/_bt2;adb shell "ls /" ; exit 0
568 - . ~/_bt2;adb shell "ls /sdcard/" ; exit 0
569 - . ~/_bt2;adb shell "ls /mnt/sdcard/" ; exit 0
570 - . ~/_bt2;adb shell "ls /mnt/sdcard/Android/" ; exit 0
571 - . ~/_bt2;adb shell "ls -al /mnt/sdcard/Android/" ; exit 0
572 - . ~/_bt2;adb shell "ls /storage/" ; exit 0
573 # -------------- info --------------
574
575 - . ~/_bt3;adb shell 'ls -al /storage/eee/Android/data' ; exit 0
576 #- . ~/_bt3;adb shell 'cp -v /storage/eee/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps/../../debug/* /storage/eee/Android/data/debug/' ; exit 0
577 #- . ~/_bt3;adb shell 'cp -v /storage/eee/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/zanavi/maps/../../debug/../yamltests/* /storage/eee/Android/data/yamltests/' ; exit 0
578
579 - . ~/_bt2;adb shell "cat /proc/meminfo" ; exit 0
580
581
582 - . ~/_bt2;adb install ~/app-signed-aligned.apk > $CIRCLE_ARTIFACTS/app_install.log 2>&1 ; cat $CIRCLE_ARTIFACTS/app_install.log | grep 'Failure' ; res=$? ; if [ $res -ne 0 ]; then echo "OK" ; else echo "ERROR" ; exit 1 ; fi
583 - . ~/_bt2;cat $CIRCLE_ARTIFACTS/app_install.log ; exit 0
584 - . ~/_bt2;if [ "$EMU_API""x" == "09x" ]; then sleep 20 ; fi
585
586 - . ~/_bt2;echo adb shell am start -n $CLASS_P/$START_INTENT_P ; adb shell am start -n $CLASS_P/$START_INTENT_P
587 - . ~/_bt2;sleep 30
588 - . ~/_bt2;if [ "$EMU_API""x" == "09x" ]; then sleep 10 ; fi
589
590 - . ~/_bt2;if [ "$EMU_API""x" == "09x" ]; then adb shell ps | grep "$CLASS_P" ; pr_id=`adb shell ps | grep "$CLASS_P" | awk '{print $2}'` ; echo "$pr_id" ; printf 'su\nid\nps\nkill '"$pr_id"'\nexit\nexit\n'|adb shell ; fi
591 - . ~/_bt2;adb shell am force-stop $CLASS_P
592
593 - . ~/_bt2;sleep 10
594
595
596 - . ~/_bt2;adb shell pm grant $CLASS_P android.permission.WRITE_EXTERNAL_STORAGE
597 - . ~/_bt2;adb shell pm grant $CLASS_P android.permission.WAKE_LOCK ; exit 0
598 - . ~/_bt2;adb shell pm grant $CLASS_P android.permission.READ_EXTERNAL_STORAGE
599 - . ~/_bt2;adb shell pm grant $CLASS_P android.permission.READ_LOGS ; exit 0
600 - . ~/_bt2;adb shell pm grant $CLASS_P android.permission.ACCESS_FINE_LOCATION
601 - . ~/_bt2;adb shell pm grant $CLASS_P android.permission.ACCESS_COARSE_LOCATION
602 - . ~/_bt2;adb shell pm grant $CLASS_P android.permission.ACCESS_LOCATION_EXTRA_COMMANDS ; exit 0
603
604
605 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/ ; ls -al " ; exit 0
606 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/ ; rm 201?-??-*/* ; rmdir 201?-??-* " ; exit 0
607 - . ~/_bt3;sleep 5
608
609
610 - . ~/_bt2;adb logcat -v time -d > $CIRCLE_ARTIFACTS/adb_out_prerun.txt 2>&1 ; exit 0
611 - . ~/_bt2;sleep 2
612 - . ~/_bt2;adb logcat -c
613 - . ~/_bt2;adb logcat -v time > $CIRCLE_ARTIFACTS/adb_out.txt 2>&1 :
614 background: true
615
616
617 - . ~/_bt2;adb shell am start -n $CLASS_P/$START_INTENT_P
618
619
620 - . ~/_bt2;sleep 50 # let app startup , it takes a while on the emulator
621 - . ~/_bt2;if [ "$EMU_API""x" == "09x" ]; then sleep 30 ; fi # even more time on older systems
622 - . ~/_bt2;if [ "$EMU_API""x" == "24x" ]; then sleep 30 ; fi # still even more time on API24
623
624 - . ~/_bt2;adb shell dumpsys meminfo $CLASS_P; exit 0
625
626 - . ~/_bt2;import -window root $CIRCLE_ARTIFACTS/capture_app_running.png # get proof that the app is running
627 - . ~/_bt2;adb shell screencap -p | sed 's/\r$//' > $CIRCLE_ARTIFACTS/capture_app_running_2.png
628
629 - . ~/_bt2;cat $CIRCLE_ARTIFACTS/adb_out.txt | grep 'CI:'
630
631 - . ~/_bt2;sleep 240 # wait for crash to show in logs
632 - . ~/_bt2;died_count=`cat $CIRCLE_ARTIFACTS/adb_out.txt|grep 'Process. '"$CLASS_P"', PID.'|wc -l|tr -d ' '` ; if [ $died_count -gt 0 ]; then echo "app crashed"; exit 1; fi
633 - . ~/_bt2;cat $CIRCLE_ARTIFACTS/adb_out.txt |grep "$CLASS_P"|grep 'has died'; died_count=$? ; if [ $died_count -eq 0 ]; then echo "app crashed"; exit 1; fi
634
635 - . ~/_bt2;cat $CIRCLE_ARTIFACTS/adb_out.txt | grep 'CI:'
636
637
638 # ---------- waiting for tests to complete -------------
639 # ---------- waiting for tests to complete -------------
640 # ---------- waiting for tests to complete -------------
641 # ---------- waiting for tests to complete -------------
642 - . ~/_bt2;rm -fv ~/_done_.txt ; exit 0
643
644 - . ~/_bt3;ready_="0" ; export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ;
645 count_files=`ls -1 ~/yaml-tests/routing-qa-master/*.yaml|wc -l|tr -d " "` ;
646 counter=0;
647 while [ $ready_ == "0" ]; do
648 echo -n "running tests " ;
649 counter=$[ $counter + 1 ] ;
650 if [ $counter -eq 38 ] ; then exit 0 ; fi ;
651 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 ;
652 n=`cat $CIRCLE_ARTIFACTS/adb_out.txt | grep ".yaml" | grep "file=" | wc -l` ;
653 echo "$n" "/" "$count_files" ;
654 adb pull "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/_XX_XX_SUMMARY_XX_XX_.txt" ~/_done_.txt > /dev/null 2> /dev/null ;
655 died_count=`cat $CIRCLE_ARTIFACTS/adb_out.txt|grep "$CLASS_P"|grep 'died'|wc -l|tr -d ' '` ;
656 cat $CIRCLE_ARTIFACTS/adb_out.txt |grep "$CLASS_P"|grep 'has died' >/dev/null 2>/dev/null ; died_count2=$? ;
657 if [ $died_count -gt 0 ] || [ $died_count2 -eq 0 ]; then
658 echo "$CLASS_P"" crashed";
659 cat $CIRCLE_ARTIFACTS/adb_out.txt|grep '=MEM='|sed -e 's#.*ZANaviDebugReceiver:##' | tail -1 ;
660 ready_="1" ;
661 else cat $CIRCLE_ARTIFACTS/adb_out.txt|grep '=MEM='|sed -e 's#.*ZANaviDebugReceiver:##' |tail -1 ;
662 fi ;
663 if [ ! -f ~/_done_.txt ]; then
664 import -window root $CIRCLE_ARTIFACTS/capture_tests_1_${counter}.png ;
665 sleep 180 ;
666 else ready_="1" ;
667 fi ;
668 done ;
669 exit 0
670 # ---------- waiting for tests to complete -------------
671 # ---------- waiting for tests to complete -------------
672 # ---------- waiting for tests to complete -------------
673 # ---------- waiting for tests to complete -------------
674
675
676 # ---------- waiting for tests to complete -------------
677 # ---------- waiting for tests to complete -------------
678 # ---------- waiting for tests to complete -------------
679 # ---------- waiting for tests to complete -------------
680 - . ~/_bt3;ready_="0" ; export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ;
681 count_files=`ls -1 ~/yaml-tests/routing-qa-master/*.yaml|wc -l|tr -d " "` ;
682 counter=0;
683 while [ $ready_ == "0" ]; do
684 echo -n "running tests " ;
685 counter=$[ $counter + 1 ] ;
686 if [ $counter -eq 38 ] ; then exit 0 ; fi ;
687 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 ;
688 n=`cat $CIRCLE_ARTIFACTS/adb_out.txt | grep ".yaml" | grep "file=" | wc -l` ;
689 echo "$n" "/" "$count_files" ;
690 adb pull "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/_XX_XX_SUMMARY_XX_XX_.txt" ~/_done_.txt > /dev/null 2> /dev/null ;
691 died_count=`cat $CIRCLE_ARTIFACTS/adb_out.txt|grep "$CLASS_P"|grep 'died'|wc -l|tr -d ' '` ;
692 cat $CIRCLE_ARTIFACTS/adb_out.txt |grep "$CLASS_P"|grep 'has died' >/dev/null 2>/dev/null ; died_count2=$? ;
693 if [ $died_count -gt 0 ] || [ $died_count2 -eq 0 ]; then
694 echo "$CLASS_P"" crashed";
695 cat $CIRCLE_ARTIFACTS/adb_out.txt|grep '=MEM='|sed -e 's#.*ZANaviDebugReceiver:##' | tail -1 ;
696 ready_="1" ;
697 else cat $CIRCLE_ARTIFACTS/adb_out.txt|grep '=MEM='|sed -e 's#.*ZANaviDebugReceiver:##' |tail -1 ;
698 fi ;
699 if [ ! -f ~/_done_.txt ]; then
700 import -window root $CIRCLE_ARTIFACTS/capture_tests_2_${counter}.png ;
701 sleep 180 ;
702 else ready_="1" ;
703 fi ;
704 done ;
705 exit 0
706 # ---------- waiting for tests to complete -------------
707 # ---------- waiting for tests to complete -------------
708 # ---------- waiting for tests to complete -------------
709 # ---------- waiting for tests to complete -------------
710
711
712 - . ~/_bt3;adb shell am force-stop $CLASS_P
713 - . ~/_bt3;sleep 20
714
715 #- . ~/_bt3;adb shell 'cp -av /storage/eee/Android/data/yamltests/* /storage/eee/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/yamltests/' ; exit 0
716 #- . ~/_bt3;adb shell 'cp -av /storage/eee/Android/data/debug/* /storage/eee/Android/data/com.zoffcc.applications.zanavi/files/zanavi/maps/debug/' ; exit 0
717
718 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/ ; ls -d 201?-??-*"
719 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/ ; ls -d 201?-??-*" | grep '201'
720 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/ ; ls -d 201?-??-*" | grep '201' | tail -1
721 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/ ; ls -d 201?-??-*" | grep '201' | tail -1 | tr -d '\r'| tr -d '\n'
722 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/ ; ls -d 201?-??-*" | grep '201' | tail -1 | tr -d '\r'| tr -d '\n' > ~/tmp.txt && _dir=`cat ~/tmp.txt`; echo 'XX'$_dir'YY'
723
724
725 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; adb shell "cd $sdpath/Android/data/com.zoffcc.applications.zanavi/files/debug/ ; ls -al" ; exit 0
726 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; mkdir ~/debug_output/ && cd ~/debug_output/ && adb pull -p "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/debug/" ; exit 0
727 - . ~/_bt3;ls -al ~/debug_output/ ; exit 0
728
729 - . ~/_bt3;mkdir ~/debug_results/ ; exit 0
730 - . ~/_bt3;ls -al ~/debug_results/
731
732
733
734
735
736
737 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; _dir=`cat ~/tmp.txt` ; cd ~/debug_results/ && adb shell ls "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/"
738 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; _dir=`cat ~/tmp.txt` ; cd ~/debug_results/ && echo adb shell ls "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/$_dir"
739 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; _dir=`cat ~/tmp.txt` ; cd ~/debug_results/ && adb shell ls "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/$_dir"
740 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; _dir=`cat ~/tmp.txt` ; cd ~/debug_results/ && adb pull -p "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/$_dir" ./
741
742
743
744
745
746
747 - . ~/_bt3;ls -al ~/debug_results/
748 - . ~/_bt3;mv -v ~/debug_results/20*/* ~/debug_results/ ; exit 0
749 - . ~/_bt3;rmdir ~/debug_results/20* ; exit 0
750 - . ~/_bt3;ls -al ~/debug_results/
751
752 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; mkdir ~/debug_summary/ && cd ~/debug_summary/ && adb pull -p "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/_XX_XX_SUMMARY_XX_XX_.txt"
753 - . ~/_bt3;export EMU2_=`echo 'EMU_'"${EMU_API}"` ; eval EMU_=\$$EMU2_ ; export EMU_ ; export sdpath2=`echo 'sdpath_'"${EMU_API}"` ; eval sdpath=\$$sdpath2 ; export sdpath ; cd ~/debug_summary/ && adb pull -p "$sdpath/Android/data/com.zoffcc.applications.zanavi/files/yamltests/_XX_XX_DURATION_XX_XX_.txt"
754
755 - . ~/_bt3;mkdir -p ~/gpx2png/out
756 - . ~/_bt3;mkdir -p ~/gpx2png/temp
757 - . ~/_bt3;cd ~/gpx2png/
758 - . ~/_bt3;wget -O ~/gpx2png/gpx2png.pl 'https://raw.githubusercontent.com/zoff99/gpx2png_perl/75abd95444385816e14c222272d971c5ac93fe2d/gpx2png.pl'
759 - . ~/_bt3;chmod u+x ~/gpx2png/gpx2png.pl
760 - . ~/_bt3;cd ~/gpx2png/temp/
761 - . ~/_bt3;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
762 - . ~/_bt3;cp -av ~/yaml-tests/routing-qa-master/*.yaml $CIRCLE_TEST_REPORTS/
763
764
765 - . ~/_bt3;pgrep -l -u ubuntu -f emulator64-arm ; pkill --signal SIGQUIT -u ubuntu -f emulator64-arm ; exit 0
766 - . ~/_bt3;pgrep -l -u ubuntu -f emulator64-arm ; exit 0
767 # - . ~/_bt3;pkill -9 -u ubuntu -f emulator64-arm
768
769
770 #- Xvfb :2 -screen 0 1920x1080x24 -nolisten tcp :
771 # background: true
772
773 - . ~/_bt3;ps auxwww ; exit 0
774
775 - . ~/_bt3;rm -Rf ~/.mozilla ; exit 0
776 - . ~/_bt3;sleep 1
777 - . ~/_bt3;nohup firefox -silent -setDefaultBrowser 'about:' :
778 background: true
779 - . ~/_bt3;sleep 20
780
781 - . ~/_bt3;ps auxwww ; exit 0
782
783
784
785 - . ~/_bt3;pgrep -l -f crashreporter ; ~/pkill2.sh crashreporter; exit 0
786 - . ~/_bt3;pgrep -l -f crashreporter ; exit 0
787
788 - . ~/_bt3;pgrep -l -f firefox ; ~/pkill2.sh firefox; exit 0
789 - . ~/_bt3;pgrep -l -f firefox ; exit 0
790
791 - . ~/_bt3;type -a firefox
792
793
794
795 - . ~/_bt3;ps auxwww ; exit 0
796
797 - . ~/_bt3;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
798 - . ~/_bt3;while [ 1 == 1 ]; do nohup firefox -silent -setDefaultBrowser 'http://www.google.com/maps/dir/47.53916,19.04749/47.53986,19.04499' > $CIRCLE_ARTIFACTS/firefox_out.txt 2>&1 ; pgrep -l -f crashreporter ; echo "kill crashreporter" ; ~/pkill2.sh crashreporter ; pgrep -l -f crashreporter ; done :
799 background: true
800 - . ~/_bt3;sleep 20
801
802 - . ~/_bt3;ps auxwww ; exit 0
803
804 # - xdotool search --name "Mozilla Firefox" windowsize 1900 1060 # too big for screen now
805 - . ~/_bt3;xdotool search --name "Mozilla Firefox" windowsize 1280 900
806 - . ~/_bt3;xdotool search --name "Mozilla Firefox" windowsize 1280 900
807 - . ~/_bt3;sleep 2
808
809 - . ~/_bt3;_dir=`cat ~/tmp.txt` ; for i in `ls -1 ~/debug_results/*._SUCCESS_.result.txt`; do
810 echo "file=$i";
811 url1=`cat "$i"|grep 'URL1'|cut -d":" -f2-` ; echo "$url1" ;
812 url2=`cat "$i"|grep 'URL2'|cut -d":" -f2-` ; echo "$url2" ;
813 url3=`cat "$i"|grep 'URL3'|cut -d":" -f2-`'/am=t/data=!3m1!4b1!4m2!4m1!3e0' ; echo "$url3" ;
814 url3_orig=`cat "$i"|grep 'URL3'|cut -d":" -f2-` ;
815 url3_orig="" ; echo "google url crashes firefox, arrgh" ;
816 url3=`cat "$i"|grep 'URL4'|cut -d":" -f2-` ; echo "$url3_orig" ;
817 url3_orig="$url3";
818 if [ "$url1""x" != "x" ]; then
819 firefox -silent -setDefaultBrowser "$url1";
820 sleep 10;
821 import -window root ~/capture001.png ;
822 out=`basename "$i" \.txt`;
823 cp -v ~/capture001.png ~/debug_results/"$out"._URL1_.png ;
824 rm -fv ~/capture001.png ;
825 fi ;
826 if [ "$url2""x" != "x" ]; then
827 firefox -silent -setDefaultBrowser "$url2";
828 sleep 10;
829 import -window root ~/capture001.png ;
830 out=`basename "$i" \.txt`;
831 cp -v ~/capture001.png ~/debug_results/"$out"._URL2_.png ;
832 rm -fv ~/capture001.png ;
833 fi ;
834 if [ "$url3_orig""x" != "x" ]; then
835 firefox -silent -setDefaultBrowser "$url3";
836 sleep 10;
837 import -window root ~/capture001.png ;
838 out=`basename "$i" \.txt`;
839 cp -v ~/capture001.png ~/debug_results/"$out"._URL3_.png ;
840 rm -fv ~/capture001.png ;
841 fi ;
842 done ;
843 exit 0
844
845 - . ~/_bt3;pgrep -l -f firefox ; ~/pkill2.sh firefox
846 # - . ~/_bt3;pkill -9 -u ubuntu -f firefox
847
848 - . ~/_bt3;cd ~/debug_results/ && cp -av * $CIRCLE_TEST_REPORTS/
849 - . ~/_bt3;cd ~/debug_output/ && mkdir -p $CIRCLE_TEST_REPORTS/ && cp -av ./* $CIRCLE_TEST_REPORTS/ ; exit 0
850 - . ~/_bt3;cd ~/debug_summary/ && mkdir -p $CIRCLE_TEST_REPORTS/0000__reports/ && cp -av ./* $CIRCLE_TEST_REPORTS/0000__reports/
851
852 - . ~/_bt3;cat ~/debug_summary/_XX_XX_SUMMARY_XX_XX_.txt
853 - . ~/_bt3;cat ~/debug_summary/_XX_XX_DURATION_XX_XX_.txt
854
855 # -- count erros ----------------------------------
856 # -- count erros ----------------------------------
857 - . ~/_bt3;mkdir -p $CIRCLE_TEST_REPORTS/0000__zanavi-runner/
858
859 - . ~/_bt3;ju_fail=0 ; _dir=`cat ~/tmp.txt` ; count_files=`ls -1 ~/yaml-tests/routing-qa-master/*.yaml|wc -l|tr -d " "` ;
860 echo $count_files ; cd ~ ; ls -al ./debug_results/ ; cd ~/yaml-tests/routing-qa-master/ ;
861 for i in `ls -1 *.yaml` ;
862 do f="./debug_results/$i"'._SUCCESS_.result.txt' ; cd ~ ; echo "f=""$f" ;
863 ls -al "$f" ; if [ -f "$f" ]; then echo "OK" ; else echo "FAIL" ; ju_fail=$[ $ju_fail + 1 ] ; fi ;
864 done ;
865 . ~/zanavi/ci/junit_start.sh ~/ju_res.xml "$count_files" "$ju_fail" ;
866 cd ~/yaml-tests/routing-qa-master/ ;
867 for i in `ls -1 *.yaml` ;
868 do f="./debug_results/$i"'._SUCCESS_.result.txt' ; cd ~ ;
869 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` ;
870 if [ -f "$f" ]; then echo "OK2" ;
871 ls -al "$f" ; . ~/zanavi/ci/junit_add.sh ~/ju_res.xml 0 "$i" "status" "OK" "$rtime"; else echo "FAIL2" ;
872 . ~/zanavi/ci/junit_add.sh ~/ju_res.xml 1 "$i" "status" "FAILED" "$rtime"; fi ;
873 done ;
874 . ~/zanavi/ci/junit_end.sh ~/ju_res.xml ; exit 0
875
876 - . ~/_bt3;cp -v ~/ju_res.xml $CIRCLE_TEST_REPORTS/0000__zanavi-runner/tests.xml
877 # -- count erros ----------------------------------
878 # -- count erros ----------------------------------
879
880 - . ~/_bt3;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
881
882 # pack results into zipfile
883 #- . ~/_bt3;cd $CIRCLE_TEST_REPORTS/ && zip -r ~/results.zip * && mkdir -p $CIRCLE_TEST_REPORTS/0000__packed/ && cp -av ~/results.zip $CIRCLE_TEST_REPORTS/0000__packed/
884
885 # throw error if some tests failed
886 - . ~/_bt3;cat ~/debug_summary/_XX_XX_SUMMARY_XX_XX_.txt | grep 'RES:ERR' ; ex=$? ; ex2=$[ 1 - $ex ] ; exit $ex2
887
888 # throw error if count of tests <> count of yaml files
889 - . ~/_bt3;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
890
891
892 - ps -fu ubuntu ; exit 0
893 - if [ "$_VIDEO_" == "1x" ]; then pkill --signal SIGINT -u ubuntu -f ffmpeg ; fi ; exit 0
894 - sleep 10
895 #- pkill -9 -u ubuntu -f ffmpeg ; exit 0
896 - ps -fu ubuntu ; exit 0
897
898 # ------ cleanup -------------
899 - mkdir $CIRCLE_ARTIFACTS/job_logs
900 - mv -v $CIRCLE_ARTIFACTS/stderr_circle_*.txt $CIRCLE_ARTIFACTS/job_logs/
901 - mv -v $CIRCLE_ARTIFACTS/stdout_circle_*.txt $CIRCLE_ARTIFACTS/job_logs/
902 # ------ cleanup -------------
903
904 # ------ kill ----------------
905 #- ps -fu ubuntu
906 #- adb -s emulator-5555 emu kill ; exit 0
907 #- adb -s emulator-5554 emu kill ; exit 0
908 #- ps -fu ubuntu
909 #- sleep 10
910 #- pkill -9 -u ubuntu -f java
911 #- sleep 10
912 #- ps -fu ubuntu
913 # ------ kill ----------------
914
915

   
Visit the ZANavi Wiki