annotate SCRIPTS/process.sh @ 45:6a072a24fed8

Test for some accompanying files
author Chris Cannam
date Thu, 07 Aug 2014 14:05:33 +0100
parents 0036098a5edb
children d572322e2efe
rev   line source
Chris@1 1 #!/bin/bash
Chris@1 2
Chris@6 3 # Run this from the top-level vamp-build-and-test directory
Chris@6 4
Chris@1 5 ## Things to test:
Chris@1 6 ## the plugin builds!
Chris@1 7 ## plugin loads
Chris@1 8 ## passes vamp-plugin-tester tests
Chris@1 9 ## does not export any unnecessary symbols
Chris@1 10 ## has valid .cat and .n3
Chris@1 11
Chris@19 12 mydir=$(dirname "$0")
Chris@19 13 case "$mydir" in /*);; *) mydir=$(pwd)/"$mydir";; esac
Chris@19 14
Chris@22 15 do_rebuild=""
Chris@14 16
Chris@22 17 usage() {
Chris@22 18 echo
Chris@22 19 echo "Usage: $0 <platform> [-c] [<dir> ...]"
Chris@22 20 echo
Chris@31 21 echo " <platform> one of native, linux32, linux64, mingw32, mingw64, osx32, osx64"
Chris@22 22 echo " -c build from clean"
Chris@22 23 echo " <dir> directory to build (default is all of them)"
Chris@22 24 echo
Chris@22 25 echo "Platform usually should match the platform you are running this"
Chris@22 26 echo "script on, unless you have a cross-compile toolset installed and"
Chris@31 27 echo "this script knows how to run it. The special platform 'native'"
Chris@31 28 echo "tries to guess the currently running platform."
Chris@22 29 echo
Chris@22 30 exit 2
Chris@22 31 }
Chris@21 32
Chris@31 33 platform_arg="$1"
Chris@31 34
Chris@31 35 if [ "$platform_arg" = "native" ]; then
Chris@31 36 case `uname -a` in
Chris@31 37 Linux*x86_64*) platform_arg=linux64;;
Chris@31 38 Linux*) platform_arg=linux32;;
Chris@31 39 Darwin*) platform_arg=osx64;;
Chris@31 40 CYG*) platform_arg=mingw32;;
Chris@31 41 MINGW*) platform_arg=mingw32;;
Chris@31 42 esac
Chris@31 43 fi
Chris@31 44
Chris@31 45 case "$platform_arg" in
Chris@22 46 linux32)
Chris@22 47 platform=linux
Chris@22 48 bits=32
Chris@22 49 toolprefix=
Chris@22 50 pluginext=.so
Chris@22 51 hostwrapper=
Chris@22 52 hostext=
Chris@38 53 valgrind=valgrind
Chris@22 54 archflags=
Chris@42 55 identpattern='ELF 32'
Chris@22 56 ;;
Chris@22 57 linux64)
Chris@22 58 platform=linux
Chris@22 59 bits=64
Chris@22 60 toolprefix=
Chris@22 61 pluginext=.so
Chris@22 62 hostwrapper=
Chris@22 63 hostext=
Chris@38 64 valgrind=valgrind
Chris@22 65 archflags=
Chris@42 66 identpattern='ELF 64'
Chris@22 67 ;;
Chris@22 68 mingw32)
Chris@22 69 platform=mingw
Chris@22 70 bits=32
Chris@22 71 toolprefix=i686-w64-mingw32-
Chris@22 72 pluginext=.dll
Chris@22 73 hostwrapper=wine
Chris@22 74 hostext=.exe
Chris@38 75 valgrind=
Chris@22 76 archflags=
Chris@36 77 identpattern='PE32.*386.*Windows'
Chris@22 78 ;;
Chris@22 79 mingw64)
Chris@22 80 platform=mingw
Chris@22 81 bits=64
Chris@22 82 toolprefix=x86_64-w64-mingw32-
Chris@22 83 pluginext=.dll
Chris@22 84 hostwrapper=wine
Chris@22 85 hostext=.exe
Chris@38 86 valgrind=
Chris@22 87 archflags=
Chris@36 88 identpattern='not known yet' ##!!!
Chris@22 89 ;;
Chris@22 90 osx32)
Chris@22 91 platform=osx
Chris@22 92 bits=32
Chris@22 93 toolprefix=
Chris@22 94 pluginext=.dylib
Chris@22 95 hostwrapper=
Chris@22 96 hostext=
Chris@38 97 valgrind=
Chris@22 98 archflags="-arch i386"
Chris@40 99 identpattern='Mach-O .*i386'
Chris@22 100 ;;
Chris@22 101 osx64)
Chris@22 102 platform=osx
Chris@22 103 bits=64
Chris@22 104 toolprefix=
Chris@22 105 pluginext=.dylib
Chris@22 106 hostwrapper=
Chris@22 107 hostext=
Chris@38 108 valgrind=
Chris@26 109 # This is a difficult choice for various reasons... have to ponder
Chris@26 110 archflags="-mmacosx-version-min=10.6 -arch x86_64 -arch i386"
Chris@40 111 identpattern='Mach-O 64-bit .*x86_64'
Chris@22 112 ;;
Chris@22 113 esac;
Chris@22 114
Chris@22 115 shift
Chris@22 116
Chris@22 117 if [ -z "$platform" ]; then
Chris@22 118 usage
Chris@22 119 else
Chris@22 120 echo "(Platform is $platform, $bits bits)"
Chris@22 121 fi
Chris@22 122
Chris@22 123 if [ t"$1" = t"-c" ]; then
Chris@22 124 echo "(Building from clean)"
Chris@22 125 do_rebuild=yes
Chris@22 126 shift
Chris@22 127 fi
Chris@15 128
Chris@19 129 depincdir="$mydir"/../DEPENDENCIES/$platform$bits/include
Chris@19 130 deplibdir="$mydir"/../DEPENDENCIES/$platform$bits/lib
Chris@19 131
Chris@19 132 depincdir_generic="$mydir"/../DEPENDENCIES/generic/include
Chris@1 133
Chris@11 134 plugindirs="$@"
Chris@11 135 if [ -z "$plugindirs" ]; then
Chris@11 136 plugindirs=$(cat .hgsub | grep -v vamp-plugin-sdk | grep -v vamp-plugin-tester | awk '{ print $1; }')
Chris@11 137 fi
Chris@11 138
Chris@6 139 reportdir="REPORTS/$platform$bits"
Chris@6 140 mkdir -p "$reportdir" || exit 1
Chris@6 141
Chris@9 142 built="/tmp/built.$$.txt"
Chris@9 143 testfailed="/tmp/testfailed.$$.txt"
Chris@19 144 envcheckfailed="/tmp/envcheckfailed.$$.txt"
Chris@9 145 notbuilt="/tmp/notbuilt.$$.txt"
Chris@19 146 trap 'rm -f "$built" "$envcheckfailed" "$testfailed" "$notbuilt"' 0
Chris@19 147 touch "$built" "$envcheckfailed" "$testfailed" "$notbuilt"
Chris@9 148
Chris@4 149 configure() {
Chris@4 150 dir="$1"
Chris@4 151 if [ -f "$dir/configure" ] ; then
Chris@6 152 ( cd "$dir" ; ./configure ) 2>&1 | tee "$reportdir/$dir.configure.txt"
Chris@4 153 fi
Chris@4 154 }
Chris@4 155
Chris@1 156 find_makefile() {
Chris@1 157 dir="$1"
Chris@9 158 for f in \
Chris@19 159 build/$platform$bits/Makefile.$platform$bits \
Chris@13 160 build/$platform/Makefile.$platform$bits \
Chris@19 161 build/$platform$bits/Makefile.$platform \
Chris@19 162 build/$platform$bits/Makefile \
Chris@19 163 build/Makefile.$platform$bits \
Chris@19 164 Makefile.$platform$bits \
Chris@13 165 build/$platform/Makefile.$platform \
Chris@13 166 build/$platform/Makefile \
Chris@13 167 build/Makefile.$platform \
Chris@9 168 Makefile.$platform \
Chris@13 169 Makefile ; do
Chris@1 170 if [ -f "$dir/$f" ]; then
Chris@1 171 echo $f
Chris@1 172 break
Chris@1 173 fi
Chris@1 174 done
Chris@1 175 }
Chris@1 176
Chris@13 177 configure_maybe() {
Chris@13 178 dir="$1"
Chris@43 179 if [ t"$do_rebuild" = t"yes" ]; then
Chris@43 180 configure "$dir"
Chris@43 181 else
Chris@43 182 mfile=$(find_makefile "$dir")
Chris@43 183 if [ -z "$mfile" ]; then
Chris@43 184 configure "$dir"
Chris@43 185 fi
Chris@13 186 fi
Chris@13 187 }
Chris@13 188
Chris@19 189 target_for() {
Chris@19 190 dir="$1"
Chris@19 191 if grep -q "^$dir: " METADATA/maketarget.txt ; then
Chris@19 192 grep "^$dir: " METADATA/maketarget.txt | head -1 | sed 's/^[^:]*: //'
Chris@19 193 fi
Chris@19 194 }
Chris@19 195
Chris@44 196 logfile_for() {
Chris@44 197 activity="$1"
Chris@44 198 dir="$2"
Chris@44 199 echo "$reportdir/$dir.$activity.txt"
Chris@44 200 }
Chris@44 201
Chris@4 202 build() {
Chris@4 203 dir="$1"
Chris@44 204 log=$(logfile_for build "$dir")
Chris@1 205 if configure_maybe "$dir"; then
Chris@1 206 mfile=$(find_makefile "$dir")
Chris@1 207 if [ -n "$mfile" ]; then
Chris@19 208 target=$(target_for "$dir")
Chris@19 209 TOOLPREFIX="$toolprefix" \
Chris@21 210 CXXFLAGS="-I${depincdir} -I${depincdir_generic} -I../vamp-plugin-sdk" \
Chris@21 211 LDFLAGS="-L${deplibdir} -L../vamp-plugin-sdk" \
Chris@21 212 ARCHFLAGS="$archflags" \
Chris@19 213 make -C "$dir" -f "$mfile" $target 2>&1 | \
Chris@44 214 tee "$log"
Chris@9 215 return ${PIPESTATUS[0]}
Chris@1 216 else
Chris@44 217 echo "Failed to find a Makefile in $dir!" | tee "$log"
Chris@4 218 return 1
Chris@1 219 fi
Chris@1 220 fi
Chris@4 221 }
Chris@4 222
Chris@4 223 rebuild() {
Chris@4 224 dir="$1"
Chris@44 225 log=$(logfile_for build "$dir")
Chris@13 226 if configure_maybe "$dir"; then
Chris@4 227 mfile=$(find_makefile "$dir")
Chris@4 228 if [ -n "$mfile" ]; then
Chris@32 229 if make -C "$dir" -f "$mfile" clean; then
Chris@32 230 build "$dir"
Chris@32 231 else
Chris@44 232 echo "Failed to 'make clean' in $dir!" | tee "$log"
Chris@32 233 return 1
Chris@32 234 fi
Chris@4 235 else
Chris@44 236 echo "Failed to find a Makefile in $dir!" | tee "$log"
Chris@4 237 return 1
Chris@4 238 fi
Chris@4 239 fi
Chris@4 240 }
Chris@4 241
Chris@22 242 build_or_rebuild() {
Chris@22 243 dir="$1"
Chris@22 244 if [ -n "$do_rebuild" ]; then
Chris@22 245 rebuild "$dir"
Chris@22 246 else
Chris@22 247 build "$dir"
Chris@22 248 fi
Chris@22 249 }
Chris@22 250
Chris@19 251 have_plugin() {
Chris@19 252 dir="$1"
Chris@44 253 log=$(logfile_for build "$dir")
Chris@19 254 for x in "$dir/"*"$pluginext"; do
Chris@19 255 if [ -f "$x" ]; then
Chris@36 256 if file "$x" | grep -q "$identpattern" ; then
Chris@36 257 return 0
Chris@36 258 else
Chris@44 259 echo "Plugin $x exists, but fails to match file type for correct platform (file type is: `file $x`, expected pattern is: $identpattern)" | tee "$log"
Chris@36 260 return 1
Chris@36 261 fi
Chris@19 262 fi
Chris@19 263 done
Chris@19 264 return 1
Chris@19 265 }
Chris@19 266
Chris@19 267 is_nondeterministic() {
Chris@19 268 plugin_id="$1"
Chris@19 269 grep -q "^$id\$" METADATA/nondeterministic.txt
Chris@19 270 }
Chris@19 271
Chris@44 272 plugin_ids_in() {
Chris@5 273 dir="$1"
Chris@40 274 # can't use sed to remove \r from DOS line endings -- BSD and GNU
Chris@44 275 # vary in how they interpret \r escape -- so we use perl for that...
Chris@44 276 VAMP_PATH="$dir" $hostwrapper \
Chris@44 277 vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids | \
Chris@44 278 grep '^vamp:' | \
Chris@44 279 sed 's/^vamp://' | \
Chris@44 280 perl -p -e 's/\r//g'
Chris@44 281 }
Chris@44 282
Chris@44 283 run_tester() {
Chris@44 284 ##!!! todo: timeout if the plugin takes too long and report as failure
Chris@44 285 dir="$1"
Chris@44 286 log=$(logfile_for test "$dir")
Chris@44 287 ids=$(plugin_ids_in "$dir")
Chris@44 288 cat /dev/null > "$log"
Chris@6 289 if [ -z "$ids" ]; then
Chris@6 290 echo
Chris@44 291 echo "No plugins reported to test in $dir" | tee -a "$log"
Chris@44 292 echo "$dir" >> "$testfailed"
Chris@44 293 return 1
Chris@44 294 fi
Chris@44 295 good=yes
Chris@44 296 for id in $ids; do
Chris@44 297 extra=""
Chris@44 298 if is_nondeterministic "$id"; then
Chris@44 299 extra="-n"
Chris@44 300 fi
Chris@44 301 echo "Running command: VAMP_PATH=\"$dir\" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext \"$extra\" \"$id\"" | tee -a "$log"
Chris@44 302 if ( VAMP_PATH="$dir" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext "$extra" "$id" 2>&1 | tee -a "$log" ; exit ${PIPESTATUS[0]} ) ; then
Chris@44 303 echo "OK"
Chris@44 304 else
Chris@44 305 echo
Chris@44 306 echo "Tester failed for id $id: running again with valgrind (if available) and verbose for a report..." | tee -a "$log"
Chris@44 307 VAMP_PATH="$dir" $valgrind $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext -v "$extra" "$id" 2>&1 | tee -a "$log"
Chris@44 308 good=no
Chris@44 309 fi
Chris@44 310 done
Chris@44 311 if [ "$good" != "yes" ]; then
Chris@23 312 echo "$dir" >> "$testfailed"
Chris@6 313 return 1
Chris@5 314 else
Chris@44 315 return 0
Chris@5 316 fi
Chris@5 317 }
Chris@5 318
Chris@44 319 public_symbols_in() {
Chris@9 320 lib="$1"
Chris@23 321 # nm -g prints global symbols in both OS/X and GNU tools, but
Chris@23 322 # printing only global *defined* symbols is harder. In GNU it is
Chris@23 323 # nm -g --defined-only; the OS/X docs suggest nm -gu should work,
Chris@23 324 # but it doesn't. What I think will work with both is simply
Chris@23 325 # grepping out the undefineds:
Chris@23 326 "$toolprefix"nm -g "$lib" | grep -v ' U ' | awk '{ print $3; }'
Chris@9 327 }
Chris@9 328
Chris@44 329 env_test_exports() {
Chris@44 330 dir="$1"
Chris@44 331 log=$(logfile_for envtest "$dir")
Chris@44 332 good=yes
Chris@44 333 for lib in "$dir"/*"$pluginext"; do
Chris@44 334 if [ ! -f "$lib" ]; then
Chris@44 335 # This should only happen if the glob was not expanded at all
Chris@44 336 echo "NOTE: no library found in $dir?" | tee -a "$log"
Chris@44 337 good=no
Chris@44 338 break
Chris@44 339 fi
Chris@44 340 echo
Chris@44 341 echo "Testing for exported symbols in $lib..."
Chris@44 342 if public_symbols_in "$lib" | grep -q vampGetPluginDescriptor; then
Chris@44 343 others=`public_symbols_in "$lib" | grep -v vampGetPluginDescriptor`
Chris@44 344 if [ -n "$others" ]; then
Chris@44 345 count=`echo "$others" | wc -l`
Chris@44 346 echo "ERROR: library $lib exports $count extra symbols in addition to vampGetPluginDescriptor" | tee -a "$log"
Chris@44 347 good=no
Chris@44 348 else
Chris@44 349 echo "GOOD: library $lib only exports vampGetPluginDescriptor" | tee -a "$log"
Chris@44 350 fi
Chris@44 351 else
Chris@44 352 echo "NOTE: found library $lib that is not a Vamp plugin library" | tee -a "$log"
Chris@44 353 fi
Chris@44 354 done
Chris@44 355 [ "$good" = "yes" ]
Chris@44 356 }
Chris@44 357
Chris@44 358 env_test_stdout() {
Chris@44 359 dir="$1"
Chris@44 360 log=$(logfile_for envtest "$dir")
Chris@44 361 good=yes
Chris@44 362 ids=$(VAMP_PATH="$dir" $hostwrapper vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids);
Chris@44 363 echo
Chris@44 364 echo "Testing for any unwanted output to stdout..."
Chris@44 365 for id in $ids; do
Chris@44 366 case "$id" in
Chris@44 367 vamp:*) ;;
Chris@44 368 *)
Chris@44 369 echo "ERROR: plugin in $dir prints to stdout as it runs: found text $id (should use stderr for debug logging to avoid mixing with batch output stream)" | tee -a "$log"
Chris@44 370 good=no
Chris@44 371 ;;
Chris@44 372 esac
Chris@44 373 done
Chris@44 374 [ "$good" = "yes" ]
Chris@44 375 }
Chris@44 376
Chris@44 377 env_test_cat() {
Chris@44 378 dir="$1"
Chris@44 379 log=$(logfile_for envtest "$dir")
Chris@44 380 good=yes
Chris@44 381 first=yes
Chris@44 382 echo
Chris@44 383 echo "Testing some details of .cat files..."
Chris@44 384 for catfile in "$dir"/*".cat"; do
Chris@44 385 if [ ! -f "$catfile" ]; then
Chris@44 386 # This should only happen if the glob was not expanded at all
Chris@44 387 echo "ERROR: no .cat file found in $dir" | tee -a "$log"
Chris@44 388 good=no
Chris@44 389 break
Chris@44 390 fi
Chris@44 391 if [ "$first" = "yes" ]; then
Chris@44 392 first=no
Chris@44 393 else
Chris@44 394 echo "NOTE: multiple .cat files found in $dir" | tee -a "$log"
Chris@44 395 fi
Chris@44 396 done
Chris@44 397 if [ "$good" = "yes" ]; then
Chris@44 398 excess=$(VAMP_PATH="$dir" $hostwrapper \
Chris@44 399 vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids | \
Chris@44 400 grep '^vamp:' | \
Chris@44 401 cat "$dir"/*".cat" - | \
Chris@44 402 sort | \
Chris@44 403 perl -e 'while (<>) {
Chris@44 404 if (/::/) {
Chris@44 405 print if (!defined $plugid or !/^$plugid/);
Chris@44 406 } else {
Chris@44 407 chomp; $plugid = $_;
Chris@44 408 }
Chris@44 409 }')
Chris@44 410 if [ -n "$excess" ]; then
Chris@44 411 echo "ERROR: excess definitions in .cat file? $excess" | tee -a "$log"
Chris@44 412 good=no
Chris@44 413 else
Chris@44 414 echo "GOOD: no excess definitions in .cat files" | tee -a "$log"
Chris@44 415 fi
Chris@44 416 fi
Chris@44 417 [ "$good" = "yes" ]
Chris@44 418 }
Chris@44 419
Chris@44 420 env_test_ttl() {
Chris@44 421 dir="$1"
Chris@44 422 log=$(logfile_for envtest "$dir")
Chris@44 423 good=yes
Chris@44 424 first=yes
Chris@44 425 echo
Chris@44 426 echo "Testing existence of RDF files..."
Chris@44 427 for ttlfile in "$dir"/*.{n3,ttl}; do
Chris@44 428 if [ ! -f "$ttlfile" ]; then
Chris@44 429 # Because we have two different extensions, this isn't an
Chris@44 430 # error as it is with e.g. .cat (because one or the other
Chris@44 431 # of .n3 and .ttl almost certainly won't exist). But if we
Chris@44 432 # drop out the bottom and first is still true, then we
Chris@44 433 # know neither matched.
Chris@44 434 :
Chris@44 435 elif [ "$first" = "yes" ]; then
Chris@44 436 first=no
Chris@44 437 else
Chris@44 438 echo "NOTE: multiple .ttl or .n3 files found in $dir" | tee -a "$log"
Chris@44 439 fi
Chris@44 440 done
Chris@45 441 if [ "$first" = "yes" ]; then
Chris@45 442 good=no;
Chris@45 443 else
Chris@45 444 echo "GOOD: found one or more .ttl or .n3 files (we don't actually test their validity or content here though)" | tee -a "$log"
Chris@45 445 fi
Chris@45 446 [ "$good" = "yes" ]
Chris@45 447 }
Chris@45 448
Chris@45 449 env_test_accompaniments() {
Chris@45 450 dir="$1"
Chris@45 451 log=$(logfile_for envtest "$dir")
Chris@45 452 good=yes
Chris@45 453 if ! ls -1 "$dir" | egrep -qi "^readme(.txt|)$"; then
Chris@45 454 echo "ERROR: no README file found" | tee -a "$log"
Chris@45 455 good=no
Chris@45 456 fi
Chris@45 457 if ! ls -1 "$dir" | egrep -qi "^(copying|licen[cs]e)(.txt|)$"; then
Chris@45 458 echo "ERROR: no COPYING or LICEN[CS]E file found" | tee -a "$log"
Chris@45 459 good=no
Chris@45 460 fi
Chris@45 461 if ! ls -1 "$dir" | egrep -qi "^citation(.txt|)$"; then
Chris@45 462 echo "NOTE: no CITATION file found" | tee -a "$log"
Chris@45 463 fi
Chris@44 464 [ "$good" = "yes" ]
Chris@44 465 }
Chris@44 466
Chris@9 467 run_environmental_tests() {
Chris@9 468 dir="$1"
Chris@44 469 log=$(logfile_for envtest "$dir")
Chris@44 470 allgood=yes
Chris@44 471 cat /dev/null > "$log"
Chris@45 472 for test in exports stdout cat ttl accompaniments; do
Chris@44 473 "env_test_$test" "$dir" || allgood=no
Chris@9 474 done
Chris@44 475 if [ "$allgood" != "yes" ]; then
Chris@19 476 echo "$dir" >> "$envcheckfailed"
Chris@44 477 return 1
Chris@44 478 else
Chris@44 479 return 0
Chris@19 480 fi
Chris@9 481 }
Chris@4 482
Chris@22 483 if ! build_or_rebuild "vamp-plugin-sdk"; then
Chris@5 484 echo "Failed to build Vamp plugin SDK!"
Chris@5 485 exit 1
Chris@5 486 fi
Chris@5 487
Chris@26 488 # Ensure we can only link statically against these
Chris@26 489 for x in vamp-hostsdk vamp-sdk; do
Chris@26 490 for y in dylib dll so; do
Chris@26 491 rm -f "vamp-plugin-sdk/lib$x.$y"
Chris@26 492 rm -f "vamp-plugin-sdk/$x.$y"
Chris@26 493 done
Chris@26 494 done
Chris@26 495
Chris@22 496 if ! build_or_rebuild "vamp-plugin-tester"; then
Chris@5 497 echo "Failed to build Vamp plugin tester!"
Chris@5 498 exit 1
Chris@5 499 fi
Chris@5 500
Chris@11 501 for dir in $plugindirs ; do
Chris@31 502 dir=${dir%/*}
Chris@4 503 echo
Chris@4 504 echo "Processing: $dir"
Chris@31 505 if [ ! -d "$dir" ]; then
Chris@31 506 echo "Directory $dir not found!"
Chris@31 507 echo "$dir" >> "$notbuilt"
Chris@31 508 elif build_or_rebuild "$dir"; then
Chris@19 509 if have_plugin "$dir" ; then
Chris@19 510 echo "$dir" >> "$built"
Chris@19 511 run_tester "$dir"
Chris@19 512 run_environmental_tests "$dir"
Chris@19 513 else
Chris@44 514 log=$(logfile_for build "$dir")
Chris@44 515 echo "Build apparently succeeded, but no resulting plugin(s) found, or plugin(s) have wrong file type or platform" | tee -a "$log"
Chris@19 516 echo "$dir" >> "$notbuilt"
Chris@19 517 fi
Chris@4 518 else
Chris@6 519 echo "$dir" >> "$notbuilt"
Chris@4 520 fi
Chris@44 521 slog=$(logfile_for summary "$dir")
Chris@44 522 cat /dev/null > "$slog"
Chris@1 523 done
Chris@1 524
Chris@4 525 echo
Chris@19 526 echo "** Successfully built, tested, and checked:"
Chris@44 527 cat "$built" | while read dir; do
Chris@44 528 slog=$(logfile_for summary "$dir")
Chris@44 529 if ! grep -q "^$dir\$" "$testfailed"; then
Chris@44 530 if ! grep -q "^$dir\$" "$envcheckfailed"; then
Chris@44 531 echo "$dir"
Chris@44 532 echo "$dir: Success" >> "$slog"
Chris@32 533 fi
Chris@6 534 fi
Chris@6 535 done | sort
Chris@4 536
Chris@4 537 echo
Chris@19 538 echo "** Failed tests:"
Chris@44 539 cat "$testfailed" | sort | uniq | while read dir; do
Chris@44 540 slog=$(logfile_for summary "$dir")
Chris@44 541 echo "$dir"
Chris@44 542 echo "$dir: Built successfully, but failed tests" >> "$slog"
Chris@6 543 done
Chris@5 544
Chris@5 545 echo
Chris@19 546 echo "** Failed environmental checks:"
Chris@44 547 cat "$envcheckfailed" | sort | uniq | while read dir; do
Chris@44 548 slog=$(logfile_for summary "$dir")
Chris@44 549 echo "$dir"
Chris@44 550 echo "$dir: Built successfully, but failed environmental checks" >> "$slog"
Chris@19 551 done
Chris@19 552
Chris@19 553 echo
Chris@4 554 echo "** Failed to build:"
Chris@44 555 cat "$notbuilt" | sort | while read dir; do
Chris@44 556 slog=$(logfile_for summary "$dir")
Chris@44 557 echo "$dir"
Chris@44 558 echo "$dir: Failed to build" >> "$slog"
Chris@6 559 done
Chris@4 560
Chris@4 561 echo