annotate SCRIPTS/process.sh @ 47:fe753ff3d0b5

Simpler solution to .cat test
author Chris Cannam
date Thu, 07 Aug 2014 15:05:37 +0100
parents d572322e2efe
children 666a1c41ce51
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@46 398 excess=$(plugin_ids_in "$dir" | sed 's/^/vamp:/' | \
Chris@44 399 cat "$dir"/*".cat" - | \
Chris@47 400 sed 's/::.*//' | \
Chris@47 401 sort | \
Chris@47 402 uniq -u)
Chris@44 403 if [ -n "$excess" ]; then
Chris@47 404 echo "ERROR: excess or missing definitions in .cat file? $excess" | tee -a "$log"
Chris@44 405 good=no
Chris@44 406 else
Chris@47 407 echo "GOOD: no excess or missing definitions in .cat files" | tee -a "$log"
Chris@44 408 fi
Chris@44 409 fi
Chris@44 410 [ "$good" = "yes" ]
Chris@44 411 }
Chris@44 412
Chris@44 413 env_test_ttl() {
Chris@44 414 dir="$1"
Chris@44 415 log=$(logfile_for envtest "$dir")
Chris@44 416 good=yes
Chris@44 417 first=yes
Chris@44 418 echo
Chris@44 419 echo "Testing existence of RDF files..."
Chris@44 420 for ttlfile in "$dir"/*.{n3,ttl}; do
Chris@44 421 if [ ! -f "$ttlfile" ]; then
Chris@44 422 # Because we have two different extensions, this isn't an
Chris@44 423 # error as it is with e.g. .cat (because one or the other
Chris@44 424 # of .n3 and .ttl almost certainly won't exist). But if we
Chris@44 425 # drop out the bottom and first is still true, then we
Chris@44 426 # know neither matched.
Chris@44 427 :
Chris@44 428 elif [ "$first" = "yes" ]; then
Chris@44 429 first=no
Chris@44 430 else
Chris@44 431 echo "NOTE: multiple .ttl or .n3 files found in $dir" | tee -a "$log"
Chris@44 432 fi
Chris@44 433 done
Chris@45 434 if [ "$first" = "yes" ]; then
Chris@45 435 good=no;
Chris@45 436 else
Chris@45 437 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 438 fi
Chris@45 439 [ "$good" = "yes" ]
Chris@45 440 }
Chris@45 441
Chris@45 442 env_test_accompaniments() {
Chris@45 443 dir="$1"
Chris@45 444 log=$(logfile_for envtest "$dir")
Chris@45 445 good=yes
Chris@46 446 echo
Chris@46 447 echo "Testing existence of README and accompanying files..."
Chris@45 448 if ! ls -1 "$dir" | egrep -qi "^readme(.txt|)$"; then
Chris@45 449 echo "ERROR: no README file found" | tee -a "$log"
Chris@45 450 good=no
Chris@45 451 fi
Chris@45 452 if ! ls -1 "$dir" | egrep -qi "^(copying|licen[cs]e)(.txt|)$"; then
Chris@45 453 echo "ERROR: no COPYING or LICEN[CS]E file found" | tee -a "$log"
Chris@45 454 good=no
Chris@45 455 fi
Chris@45 456 if ! ls -1 "$dir" | egrep -qi "^citation(.txt|)$"; then
Chris@45 457 echo "NOTE: no CITATION file found" | tee -a "$log"
Chris@45 458 fi
Chris@44 459 [ "$good" = "yes" ]
Chris@44 460 }
Chris@44 461
Chris@9 462 run_environmental_tests() {
Chris@9 463 dir="$1"
Chris@44 464 log=$(logfile_for envtest "$dir")
Chris@44 465 allgood=yes
Chris@44 466 cat /dev/null > "$log"
Chris@45 467 for test in exports stdout cat ttl accompaniments; do
Chris@44 468 "env_test_$test" "$dir" || allgood=no
Chris@9 469 done
Chris@44 470 if [ "$allgood" != "yes" ]; then
Chris@19 471 echo "$dir" >> "$envcheckfailed"
Chris@44 472 return 1
Chris@44 473 else
Chris@44 474 return 0
Chris@19 475 fi
Chris@9 476 }
Chris@4 477
Chris@22 478 if ! build_or_rebuild "vamp-plugin-sdk"; then
Chris@5 479 echo "Failed to build Vamp plugin SDK!"
Chris@5 480 exit 1
Chris@5 481 fi
Chris@5 482
Chris@26 483 # Ensure we can only link statically against these
Chris@26 484 for x in vamp-hostsdk vamp-sdk; do
Chris@26 485 for y in dylib dll so; do
Chris@26 486 rm -f "vamp-plugin-sdk/lib$x.$y"
Chris@26 487 rm -f "vamp-plugin-sdk/$x.$y"
Chris@26 488 done
Chris@26 489 done
Chris@26 490
Chris@22 491 if ! build_or_rebuild "vamp-plugin-tester"; then
Chris@5 492 echo "Failed to build Vamp plugin tester!"
Chris@5 493 exit 1
Chris@5 494 fi
Chris@5 495
Chris@11 496 for dir in $plugindirs ; do
Chris@31 497 dir=${dir%/*}
Chris@4 498 echo
Chris@4 499 echo "Processing: $dir"
Chris@31 500 if [ ! -d "$dir" ]; then
Chris@31 501 echo "Directory $dir not found!"
Chris@31 502 echo "$dir" >> "$notbuilt"
Chris@31 503 elif build_or_rebuild "$dir"; then
Chris@19 504 if have_plugin "$dir" ; then
Chris@19 505 echo "$dir" >> "$built"
Chris@19 506 run_tester "$dir"
Chris@19 507 run_environmental_tests "$dir"
Chris@19 508 else
Chris@44 509 log=$(logfile_for build "$dir")
Chris@44 510 echo "Build apparently succeeded, but no resulting plugin(s) found, or plugin(s) have wrong file type or platform" | tee -a "$log"
Chris@19 511 echo "$dir" >> "$notbuilt"
Chris@19 512 fi
Chris@4 513 else
Chris@6 514 echo "$dir" >> "$notbuilt"
Chris@4 515 fi
Chris@44 516 slog=$(logfile_for summary "$dir")
Chris@44 517 cat /dev/null > "$slog"
Chris@1 518 done
Chris@1 519
Chris@4 520 echo
Chris@19 521 echo "** Successfully built, tested, and checked:"
Chris@44 522 cat "$built" | while read dir; do
Chris@44 523 slog=$(logfile_for summary "$dir")
Chris@44 524 if ! grep -q "^$dir\$" "$testfailed"; then
Chris@44 525 if ! grep -q "^$dir\$" "$envcheckfailed"; then
Chris@44 526 echo "$dir"
Chris@44 527 echo "$dir: Success" >> "$slog"
Chris@32 528 fi
Chris@6 529 fi
Chris@6 530 done | sort
Chris@4 531
Chris@4 532 echo
Chris@19 533 echo "** Failed tests:"
Chris@44 534 cat "$testfailed" | sort | uniq | while read dir; do
Chris@44 535 slog=$(logfile_for summary "$dir")
Chris@44 536 echo "$dir"
Chris@44 537 echo "$dir: Built successfully, but failed tests" >> "$slog"
Chris@6 538 done
Chris@5 539
Chris@5 540 echo
Chris@19 541 echo "** Failed environmental checks:"
Chris@44 542 cat "$envcheckfailed" | sort | uniq | while read dir; do
Chris@44 543 slog=$(logfile_for summary "$dir")
Chris@44 544 echo "$dir"
Chris@44 545 echo "$dir: Built successfully, but failed environmental checks" >> "$slog"
Chris@19 546 done
Chris@19 547
Chris@19 548 echo
Chris@4 549 echo "** Failed to build:"
Chris@44 550 cat "$notbuilt" | sort | while read dir; do
Chris@44 551 slog=$(logfile_for summary "$dir")
Chris@44 552 echo "$dir"
Chris@44 553 echo "$dir: Failed to build" >> "$slog"
Chris@6 554 done
Chris@4 555
Chris@4 556 echo