Mercurial > hg > vamp-build-and-test
comparison SCRIPTS/process.sh @ 32:6fc0d89020f2
Report env check failures, etc
author | Chris Cannam |
---|---|
date | Wed, 06 Aug 2014 15:58:31 +0100 |
parents | 090303b184d8 |
children | 56eff3575b55 25a9332971f7 |
comparison
equal
deleted
inserted
replaced
31:090303b184d8 | 32:6fc0d89020f2 |
---|---|
200 rebuild() { | 200 rebuild() { |
201 dir="$1" | 201 dir="$1" |
202 if configure_maybe "$dir"; then | 202 if configure_maybe "$dir"; then |
203 mfile=$(find_makefile "$dir") | 203 mfile=$(find_makefile "$dir") |
204 if [ -n "$mfile" ]; then | 204 if [ -n "$mfile" ]; then |
205 make -C "$dir" -f "$mfile" clean | 205 if make -C "$dir" -f "$mfile" clean; then |
206 build "$dir" | 206 build "$dir" |
207 else | |
208 echo "Failed to 'make clean' in $dir!" | tee "$reportdir/$dir.build.txt" | |
209 return 1 | |
210 fi | |
207 else | 211 else |
208 echo "Failed to find a Makefile in $dir" | 212 echo "Failed to find a Makefile in $dir!" | tee "$reportdir/$dir.build.txt" |
209 return 1 | 213 return 1 |
210 fi | 214 fi |
211 fi | 215 fi |
212 } | 216 } |
213 | 217 |
237 | 241 |
238 run_tester() { | 242 run_tester() { |
239 ##!!! todo: timeout if the plugin takes too long and report as failure? | 243 ##!!! todo: timeout if the plugin takes too long and report as failure? |
240 dir="$1" | 244 dir="$1" |
241 ids=$(VAMP_PATH="$dir" $hostwrapper vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids | sed 's/^vamp://' | sed 's/\r//g' ) | 245 ids=$(VAMP_PATH="$dir" $hostwrapper vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids | sed 's/^vamp://' | sed 's/\r//g' ) |
246 cat /dev/null > "$reportdir/$dir.test.txt" | |
242 if [ -z "$ids" ]; then | 247 if [ -z "$ids" ]; then |
243 echo | 248 echo |
244 echo "No plugins reported to test in $dir" | 249 echo "No plugins reported to test in $dir" | tee -a "$reportdir/$dir.test.txt" |
245 echo "$dir" >> "$testfailed" | 250 echo "$dir" >> "$testfailed" |
246 return 1 | 251 return 1 |
247 else | 252 else |
248 for id in $ids; do | 253 for id in $ids; do |
249 extra="" | 254 extra="" |
250 if is_nondeterministic "$id"; then | 255 if is_nondeterministic "$id"; then |
251 extra="-n" | 256 extra="-n" |
252 fi | 257 fi |
253 echo "Running command: VAMP_PATH=\"$dir\" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext \"$extra\" \"$id\"" | 258 echo "Running command: VAMP_PATH=\"$dir\" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext \"$extra\" \"$id\"" |
254 if ( VAMP_PATH="$dir" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext "$extra" "$id" 2>&1 | tee "$reportdir/$dir.test.txt" ; exit ${PIPESTATUS[0]} ) ; then | 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 |
255 echo "OK" | 260 echo "OK" |
256 else | 261 else |
257 echo | 262 echo |
258 echo "Tester failed for id $id: running again with valgrind and verbose for a report..." | 263 echo "Tester failed for id $id: running again with valgrind and verbose for a report..." |
259 echo "$dir" >> "$testfailed" | 264 echo "$dir" >> "$testfailed" |
275 } | 280 } |
276 | 281 |
277 run_environmental_tests() { | 282 run_environmental_tests() { |
278 dir="$1" | 283 dir="$1" |
279 good=yes | 284 good=yes |
285 cat /dev/null > "$reportdir/$dir.envtest.txt" | |
280 for lib in $dir/*$pluginext; do | 286 for lib in $dir/*$pluginext; do |
281 if [ ! -f "$lib" ]; then | 287 if [ ! -f "$lib" ]; then |
282 echo "NOTE: no library found in $dir?" | 288 echo "NOTE: no library found in $dir?" | tee -a "$reportdir/$dir.envtest.txt" |
283 good=no | 289 good=no |
284 else | 290 else |
285 echo | 291 echo |
286 echo "Testing for exported symbols in $lib..." | 292 echo "Testing for exported symbols in $lib..." |
287 if public_symbols "$lib" | grep -q vampGetPluginDescriptor; then | 293 if public_symbols "$lib" | grep -q vampGetPluginDescriptor; then |
288 others=`public_symbols "$lib" | grep -v vampGetPluginDescriptor` | 294 others=`public_symbols "$lib" | grep -v vampGetPluginDescriptor` |
289 if [ -n "$others" ]; then | 295 if [ -n "$others" ]; then |
290 count=`echo "$others" | wc -l` | 296 count=`echo "$others" | wc -l` |
291 echo "WARNING: $count extra symbols exported by plugin library" | 297 echo "WARNING: $count extra symbols exported by plugin library" | tee -a "$reportdir/$dir.envtest.txt" |
292 good=no | 298 good=no |
293 else | 299 else |
294 echo "GOOD: library $lib only exports vampGetPluginDescriptor" | 300 echo "GOOD: library $lib only exports vampGetPluginDescriptor" | tee -a "$reportdir/$dir.envtest.txt" |
295 fi | 301 fi |
296 else | 302 else |
297 echo "NOTE: found library $lib that is not a Vamp plugin library" | 303 echo "NOTE: found library $lib that is not a Vamp plugin library" | tee -a "$reportdir/$dir.envtest.txt" |
298 fi | 304 fi |
299 fi | 305 fi |
300 done | 306 done |
301 if [ "$good" != "yes" ]; then | 307 if [ "$good" != "yes" ]; then |
302 echo "$dir" >> "$envcheckfailed" | 308 echo "$dir" >> "$envcheckfailed" |
346 | 352 |
347 echo | 353 echo |
348 echo "** Successfully built, tested, and checked:" | 354 echo "** Successfully built, tested, and checked:" |
349 cat "$built" | while read d; do | 355 cat "$built" | while read d; do |
350 if ! grep -q "^$d\$" "$testfailed"; then | 356 if ! grep -q "^$d\$" "$testfailed"; then |
351 echo "$d" | 357 if ! grep -q "^$d\$" "$envcheckfailed"; then |
352 echo "Success" >> "$reportdir/$d.summary.txt" | 358 echo "$d" |
359 echo "Success" >> "$reportdir/$d.summary.txt" | |
360 fi | |
353 fi | 361 fi |
354 done | sort | 362 done | sort |
355 | 363 |
356 echo | 364 echo |
357 echo "** Failed tests:" | 365 echo "** Failed tests:" |