Mercurial > hg > vamp-build-and-test
comparison process.sh @ 5:57da88814766
Run tester, report
author | Chris Cannam |
---|---|
date | Sat, 26 Jul 2014 10:50:24 +0100 |
parents | 780c4fc19f3e |
children |
comparison
equal
deleted
inserted
replaced
4:780c4fc19f3e | 5:57da88814766 |
---|---|
59 return 1 | 59 return 1 |
60 fi | 60 fi |
61 fi | 61 fi |
62 } | 62 } |
63 | 63 |
64 run_tester() { | |
65 ##!!! todo: list the plugins in each library and run the tester | |
66 ##!!! separately on each -- that way we can report on specific | |
67 ##!!! plugins rather than whole libraries (though for the | |
68 ##!!! "printout" report we should include the whole library test, | |
69 ##!!! just for information's sake?) and we can have separate | |
70 ##!!! nondeterministic statuses | |
71 dir="$1" | |
72 extra="" | |
73 if grep -q "^$dir\$" nondeterministic.txt; then | |
74 extra="-n" | |
75 fi | |
76 if VAMP_PATH="$dir" vamp-plugin-tester/vamp-plugin-tester "$extra" -a ; then | |
77 echo "OK" | |
78 else | |
79 echo | |
80 echo "Tester failed: running again with valgrind and verbose for a report..." | |
81 VAMP_PATH="$dir" valgrind vamp-plugin-tester/vamp-plugin-tester -v "$extra" -a | |
82 fi | |
83 } | |
84 | |
64 successes="/tmp/successes.$$.txt" | 85 successes="/tmp/successes.$$.txt" |
86 partials="/tmp/successes.$$.txt" | |
65 failures="/tmp/failures.$$.txt" | 87 failures="/tmp/failures.$$.txt" |
66 trap 'rm -f "$successes" "$failures"' 0 | 88 trap 'rm -f "$successes" "$partials" "$failures"' 0 |
67 | 89 |
68 for dir in $(cat .hgsub | awk '{ print $1; }') ; do | 90 if ! build "vamp-plugin-sdk"; then |
91 echo "Failed to build Vamp plugin SDK!" | |
92 exit 1 | |
93 fi | |
94 | |
95 if ! build "vamp-plugin-tester"; then | |
96 echo "Failed to build Vamp plugin tester!" | |
97 exit 1 | |
98 fi | |
99 | |
100 for dir in $(cat .hgsub | grep -v vamp-plugin-sdk | grep -v vamp-plugin-tester | awk '{ print $1; }') ; do | |
69 echo | 101 echo |
70 echo "Processing: $dir" | 102 echo "Processing: $dir" |
71 if build "$dir"; then | 103 if build "$dir"; then |
72 echo "$dir" >> "$successes" | 104 if run_tester "$dir"; then |
105 echo "$dir" >> "$successes" | |
106 else | |
107 echo "$dir" >> "$partials" | |
108 fi | |
73 else | 109 else |
74 echo "$dir" >> "$failures" | 110 echo "$dir" >> "$failures" |
75 fi | 111 fi |
76 done | 112 done |
77 | 113 |
78 echo | 114 echo |
79 echo "** Succeeded in building:" | 115 echo "** Successfully built and tested:" |
80 cat "$successes" | 116 cat "$successes" |
117 | |
118 echo | |
119 echo "** Built, but failed tests:" | |
120 cat "$partials" | |
81 | 121 |
82 echo | 122 echo |
83 echo "** Failed to build:" | 123 echo "** Failed to build:" |
84 cat "$failures" | 124 cat "$failures" |
85 | 125 |