comparison SCRIPTS/process.sh @ 38:25a9332971f7

Various fixes to scripts for mingw32
author Chris Cannam
date Wed, 06 Aug 2014 17:43:06 +0100
parents 6fc0d89020f2
children 12d422dd6992
comparison
equal deleted inserted replaced
35:86bb97521df4 38:25a9332971f7
48 bits=32 48 bits=32
49 toolprefix= 49 toolprefix=
50 pluginext=.so 50 pluginext=.so
51 hostwrapper= 51 hostwrapper=
52 hostext= 52 hostext=
53 valgrind=valgrind
53 archflags= 54 archflags=
54 ;; 55 ;;
55 linux64) 56 linux64)
56 platform=linux 57 platform=linux
57 bits=64 58 bits=64
58 toolprefix= 59 toolprefix=
59 pluginext=.so 60 pluginext=.so
60 hostwrapper= 61 hostwrapper=
61 hostext= 62 hostext=
63 valgrind=valgrind
62 archflags= 64 archflags=
63 ;; 65 ;;
64 mingw32) 66 mingw32)
65 platform=mingw 67 platform=mingw
66 bits=32 68 bits=32
67 toolprefix=i686-w64-mingw32- 69 toolprefix=i686-w64-mingw32-
68 pluginext=.dll 70 pluginext=.dll
69 hostwrapper=wine 71 hostwrapper=wine
70 hostext=.exe 72 hostext=.exe
73 valgrind=
71 archflags= 74 archflags=
72 ;; 75 ;;
73 mingw64) 76 mingw64)
74 platform=mingw 77 platform=mingw
75 bits=64 78 bits=64
76 toolprefix=x86_64-w64-mingw32- 79 toolprefix=x86_64-w64-mingw32-
77 pluginext=.dll 80 pluginext=.dll
78 hostwrapper=wine 81 hostwrapper=wine
79 hostext=.exe 82 hostext=.exe
83 valgrind=
80 archflags= 84 archflags=
81 ;; 85 ;;
82 osx32) 86 osx32)
83 platform=osx 87 platform=osx
84 bits=32 88 bits=32
85 toolprefix= 89 toolprefix=
86 pluginext=.dylib 90 pluginext=.dylib
87 hostwrapper= 91 hostwrapper=
88 hostext= 92 hostext=
93 valgrind=
89 archflags="-arch i386" 94 archflags="-arch i386"
90 ;; 95 ;;
91 osx64) 96 osx64)
92 platform=osx 97 platform=osx
93 bits=64 98 bits=64
94 toolprefix= 99 toolprefix=
95 pluginext=.dylib 100 pluginext=.dylib
96 hostwrapper= 101 hostwrapper=
97 hostext= 102 hostext=
103 valgrind=
98 # This is a difficult choice for various reasons... have to ponder 104 # This is a difficult choice for various reasons... have to ponder
99 archflags="-mmacosx-version-min=10.6 -arch x86_64 -arch i386" 105 archflags="-mmacosx-version-min=10.6 -arch x86_64 -arch i386"
100 ;; 106 ;;
101 esac; 107 esac;
102 108
248 echo 254 echo
249 echo "No plugins reported to test in $dir" | tee -a "$reportdir/$dir.test.txt" 255 echo "No plugins reported to test in $dir" | tee -a "$reportdir/$dir.test.txt"
250 echo "$dir" >> "$testfailed" 256 echo "$dir" >> "$testfailed"
251 return 1 257 return 1
252 else 258 else
259 good=yes
253 for id in $ids; do 260 for id in $ids; do
254 extra="" 261 extra=""
255 if is_nondeterministic "$id"; then 262 if is_nondeterministic "$id"; then
256 extra="-n" 263 extra="-n"
257 fi 264 fi
258 echo "Running command: VAMP_PATH=\"$dir\" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext \"$extra\" \"$id\"" 265 echo "Running command: VAMP_PATH=\"$dir\" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext \"$extra\" \"$id\"" | tee -a "$reportdir/$dir.test.txt"
259 if ( VAMP_PATH="$dir" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext "$extra" "$id" 2>&1 | tee -a "$reportdir/$dir.test.txt" ; exit ${PIPESTATUS[0]} ) ; then 266 if ( VAMP_PATH="$dir" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext "$extra" "$id" 2>&1 | tee -a "$reportdir/$dir.test.txt" ; exit ${PIPESTATUS[0]} ) ; then
260 echo "OK" 267 echo "OK"
261 else 268 else
262 echo 269 echo
263 echo "Tester failed for id $id: running again with valgrind and verbose for a report..." 270 echo "Tester failed for id $id: running again with valgrind (if available) and verbose for a report..."
264 echo "$dir" >> "$testfailed" 271 echo "$dir" >> "$testfailed"
265 VAMP_PATH="$dir" valgrind $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext -v "$extra" "$id" 2>&1 | tee -a "$reportdir/$dir.test.txt" 272 VAMP_PATH="$dir" $valgrind $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext -v "$extra" "$id" 2>&1 | tee -a "$reportdir/$dir.test.txt"
266 return 1 273 good=no
267 fi 274 fi
268 done 275 done
269 fi 276 if [ "$good" != "yes" ]; then
277 return 1
278 fi
279 fi
280 return 0
270 } 281 }
271 282
272 public_symbols() { 283 public_symbols() {
273 lib="$1" 284 lib="$1"
274 # nm -g prints global symbols in both OS/X and GNU tools, but 285 # nm -g prints global symbols in both OS/X and GNU tools, but
344 echo "$dir" >> "$notbuilt" 355 echo "$dir" >> "$notbuilt"
345 fi 356 fi
346 else 357 else
347 echo "$dir" >> "$notbuilt" 358 echo "$dir" >> "$notbuilt"
348 fi 359 fi
349 done 360 cat /dev/null > "$reportdir/$dir.summary.txt"
350 361 done
351 cat /dev/null > "$reportdir/$dir.summary.txt"
352 362
353 echo 363 echo
354 echo "** Successfully built, tested, and checked:" 364 echo "** Successfully built, tested, and checked:"
355 cat "$built" | while read d; do 365 cat "$built" | while read d; do
356 if ! grep -q "^$d\$" "$testfailed"; then 366 if ! grep -q "^$d\$" "$testfailed"; then
357 if ! grep -q "^$d\$" "$envcheckfailed"; then 367 if ! grep -q "^$d\$" "$envcheckfailed"; then
358 echo "$d" 368 echo "$d"
359 echo "Success" >> "$reportdir/$d.summary.txt" 369 echo "$d: Success" >> "$reportdir/$d.summary.txt"
360 fi 370 fi
361 fi 371 fi
362 done | sort 372 done | sort
363 373
364 echo 374 echo
365 echo "** Failed tests:" 375 echo "** Failed tests:"
366 cat "$testfailed" | sort | uniq | while read d; do 376 cat "$testfailed" | sort | uniq | while read d; do
367 echo "$d" 377 echo "$d"
368 echo "Built successfully, but failed tests" >> "$reportdir/$d.summary.txt" 378 echo "$d: Built successfully, but failed tests" >> "$reportdir/$d.summary.txt"
369 done 379 done
370 380
371 echo 381 echo
372 echo "** Failed environmental checks:" 382 echo "** Failed environmental checks:"
373 cat "$envcheckfailed" | sort | uniq | while read d; do 383 cat "$envcheckfailed" | sort | uniq | while read d; do
374 echo "$d" 384 echo "$d"
375 echo "Built successfully, but failed environmental checks" >> "$reportdir/$d.summary.txt" 385 echo "$d: Built successfully, but failed environmental checks" >> "$reportdir/$d.summary.txt"
376 done 386 done
377 387
378 echo 388 echo
379 echo "** Failed to build:" 389 echo "** Failed to build:"
380 cat "$notbuilt" | sort | while read d; do 390 cat "$notbuilt" | sort | while read d; do
381 echo "$d" 391 echo "$d"
382 echo "Failed to build" >> "$reportdir/$d.summary.txt" 392 echo "$d: Failed to build" >> "$reportdir/$d.summary.txt"
383 done 393 done
384 394
385 echo 395 echo