Mercurial > hg > vamp-build-and-test
comparison SCRIPTS/process.sh @ 96:e24202b02c69
Path separator
author | Chris Cannam |
---|---|
date | Wed, 12 Aug 2015 15:23:57 +0100 |
parents | 1abd36a8d5b8 |
children | 793467b5e61c |
comparison
equal
deleted
inserted
replaced
95:5addbcdc2e87 | 96:e24202b02c69 |
---|---|
68 hostwrapper= | 68 hostwrapper= |
69 hostext= | 69 hostext= |
70 valgrind= | 70 valgrind= |
71 archflags= | 71 archflags= |
72 identpattern= | 72 identpattern= |
73 sep=":" | |
73 | 74 |
74 case "$platform_arg" in | 75 case "$platform_arg" in |
75 linux32) | 76 linux32) |
76 platform=linux | 77 platform=linux |
77 pluginext=.so | 78 pluginext=.so |
90 toolprefix=i686-w64-mingw32- | 91 toolprefix=i686-w64-mingw32- |
91 pluginext=.dll | 92 pluginext=.dll |
92 hostwrapper=wine | 93 hostwrapper=wine |
93 hostext=.exe | 94 hostext=.exe |
94 identpattern='PE32.*386.*Windows' | 95 identpattern='PE32.*386.*Windows' |
96 sep=";" | |
95 ;; | 97 ;; |
96 mingw64) | 98 mingw64) |
97 platform=mingw | 99 platform=mingw |
98 bits=64 | 100 bits=64 |
99 altbits=32 # We can usually use a mingw32 Makefile if toolprefix is OK | 101 altbits=32 # We can usually use a mingw32 Makefile if toolprefix is OK |
100 toolprefix=x86_64-w64-mingw32- | 102 toolprefix=x86_64-w64-mingw32- |
101 pluginext=.dll | 103 pluginext=.dll |
102 hostwrapper=wine | 104 hostwrapper=wine |
103 hostext=.exe | 105 hostext=.exe |
104 identpattern='PE32.*x86-64.*Windows' | 106 identpattern='PE32.*x86-64.*Windows' |
107 sep=";" | |
105 ;; | 108 ;; |
106 osx32) | 109 osx32) |
107 platform=osx | 110 platform=osx |
108 pluginext=.dylib | 111 pluginext=.dylib |
109 archflags="-arch i386" | 112 archflags="-arch i386" |
234 | 237 |
235 find_vampy_plugins_in() { | 238 find_vampy_plugins_in() { |
236 local dir="$1" | 239 local dir="$1" |
237 local pdir=$(plugin_dir_for "$dir") | 240 local pdir=$(plugin_dir_for "$dir") |
238 if [ -z "$pdir" ]; then | 241 if [ -z "$pdir" ]; then |
239 pdir="${mydir}/../${dir}" | 242 case "$dir" in |
243 /*) pdir="$dir" ;; | |
244 *) pdir="${mydir}/../${dir}";; | |
245 esac | |
240 fi | 246 fi |
241 find "$pdir" -name \*.py -print0 | xargs -0 grep -l 'import.*\bvampy\b' | 247 find "$pdir" -name \*.py -print0 | xargs -0 grep -l 'import.*\bvampy\b' |
242 } | 248 } |
243 | 249 |
244 have_vampy_plugins() { | 250 have_vampy_plugins() { |
352 if have_vampy_plugins "$pdir"; then | 358 if have_vampy_plugins "$pdir"; then |
353 vampydir="./vampy" | 359 vampydir="./vampy" |
354 fi | 360 fi |
355 # can't use sed to remove \r from DOS line endings -- BSD and GNU | 361 # can't use sed to remove \r from DOS line endings -- BSD and GNU |
356 # vary in how they interpret \r escape -- so we use perl for that... | 362 # vary in how they interpret \r escape -- so we use perl for that... |
357 VAMP_PATH="$dir:$pdir:$vampydir" $hostwrapper \ | 363 VAMP_PATH="$dir$sep$pdir$sep$vampydir" $hostwrapper \ |
358 vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids | \ | 364 vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids | \ |
359 grep '^vamp:' | \ | 365 grep '^vamp:' | \ |
360 sed 's/^vamp://' | \ | 366 sed 's/^vamp://' | \ |
361 perl -p -e 's/\r//g' | 367 perl -p -e 's/\r//g' |
362 } | 368 } |
378 for id in $ids; do | 384 for id in $ids; do |
379 extra="" | 385 extra="" |
380 if is_nondeterministic "$id"; then | 386 if is_nondeterministic "$id"; then |
381 extra="-n" | 387 extra="-n" |
382 fi | 388 fi |
383 echo "Running command: VAMP_PATH=\"$dir:$pdir\" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext \"$extra\" \"$id\"" | tee -a "$log" | 389 echo "Running command: VAMP_PATH=\"$dir$sep$pdir\" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext \"$extra\" \"$id\"" | tee -a "$log" |
384 if ( VAMP_PATH="$dir:$pdir:./vampy" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext "$extra" "$id" 2>&1 | tee -a "$log" ; exit ${PIPESTATUS[0]} ) ; then | 390 if ( VAMP_PATH="$dir$sep$pdir$sep./vampy" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext "$extra" "$id" 2>&1 | tee -a "$log" ; exit ${PIPESTATUS[0]} ) ; then |
385 echo "OK" | tee -a "$log" | 391 echo "OK" | tee -a "$log" |
386 else | 392 else |
387 if have_vampy_plugins "$pdir"; then # (don't attempt vampy+valgrind) | 393 if have_vampy_plugins "$pdir"; then # (don't attempt vampy+valgrind) |
388 echo | tee -a "$log" | 394 echo | tee -a "$log" |
389 echo "Tester failed for id $id (not restarting with valgrind, as this is a VamPy plugin)" | tee -a "$log" | 395 echo "Tester failed for id $id (not restarting with valgrind, as this is a VamPy plugin)" | tee -a "$log" |
390 else | 396 else |
391 echo | tee -a "$log" | 397 echo | tee -a "$log" |
392 echo "Tester failed for id $id: running again with valgrind (if available) and verbose for a report..." | tee -a "$log" | 398 echo "Tester failed for id $id: running again with valgrind (if available) and verbose for a report..." | tee -a "$log" |
393 VAMP_PATH="$dir:$pdir:./vampy" $valgrind $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext -v "$extra" "$id" 2>&1 | tee -a "$log" | 399 VAMP_PATH="$dir$sep$pdir$sep./vampy" $valgrind $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext -v "$extra" "$id" 2>&1 | tee -a "$log" |
394 fi | 400 fi |
395 good=no | 401 good=no |
396 fi | 402 fi |
397 done | 403 done |
398 if [ "$good" != "yes" ]; then | 404 if [ "$good" != "yes" ]; then |
445 env_test_stdout() { | 451 env_test_stdout() { |
446 local dir="$1" | 452 local dir="$1" |
447 local log=$(logfile_for envtest "$dir") | 453 local log=$(logfile_for envtest "$dir") |
448 local pdir=$(plugin_dir_for "$dir") | 454 local pdir=$(plugin_dir_for "$dir") |
449 local good=yes | 455 local good=yes |
450 local ids=$(VAMP_PATH="$dir:$pdir" $hostwrapper vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids); | 456 local ids=$(VAMP_PATH="$dir$sep$pdir" $hostwrapper vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids); |
451 echo | 457 echo |
452 echo "Testing for any unwanted output to stdout..." | 458 echo "Testing for any unwanted output to stdout..." |
453 for id in $ids; do | 459 for id in $ids; do |
454 case "$id" in | 460 case "$id" in |
455 vamp:*) ;; | 461 vamp:*) ;; |