Mercurial > hg > vamp-build-and-test
changeset 80:dc4da16ace47
Cope with directories that (like VamPy) have actual plugins in a subdir. Also update subrepos.
author | Chris Cannam |
---|---|
date | Mon, 17 Nov 2014 13:00:08 +0000 |
parents | 71000cf7f414 |
children | 7b0efd6da3a9 |
files | .hgsubstate METADATA/plugindir.txt SCRIPTS/process.sh |
diffstat | 3 files changed, 31 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsubstate Thu Oct 30 17:39:24 2014 +0000 +++ b/.hgsubstate Mon Nov 17 13:00:08 2014 +0000 @@ -1,17 +1,17 @@ 2c7803df84b8d2e1b9d19c82a63a985d4c020cec constant-q-cpp -89929e9e54fb42df57d093c2ddbc78059669feba match-vamp +a68204b9a529352a0042a9343f99b0d2b64c9ffc match-vamp ca32a96c123a2c3f7548e37a8d5f4205632bdd9d mazurka-plugins 6408759460777522101d3310de8e6852a1a1af61 nnls-chroma e83e6bb1367a5524db9c6f41cec3445eccad1a5f predomino 00cffb79d0e0d84e63914c0079601145fa6997ae pyin 6c9ab70d23861140f918024c875b7dd92bd6a04d qm-vamp-plugins 11a826034a9d67fc3ba36ceea052ccd4554f82f2 segmenter-vamp-plugin -19fd6cb033c7f00b6629a455006cf2e394886efd silvet +a3229b972463034933584aa59cf8b25323a46e2f silvet b835875739968beb870e7e09132aa361656a8a30 vamp-aubio-plugins 81146373f024be1c82371f04262cf2ae1680cb61 vamp-libxtract-plugins 8bc4ec815b6b695371dc9dda500191892ca5d2a7 vamp-onsetsds-plugin 632d90c185ecc8655f7a85ba58dc568351449dfd vamp-plugin-sdk -86d8a699dfbed931a8e53a7db42af4098f760695 vamp-plugin-tester +314eea778b805e9308494e0d9eea6516624f7ee1 vamp-plugin-tester 02721bb9c4f07dadfe5fd32e2ac9d6f6958749a5 vamp-tempogram a7bd1daac7f3c1472abbdc16850c2e5935113790 vamp-test-plugin -0df94e3f0fdb6eac02860655503e242a86cbb671 vampy +f5b8646494d2d8089badcdbaf31c5ea779ca7428 vampy
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/METADATA/plugindir.txt Mon Nov 17 13:00:08 2014 +0000 @@ -0,0 +1,1 @@ +vampy: Example VamPy plugins
--- a/SCRIPTS/process.sh Thu Oct 30 17:39:24 2014 +0000 +++ b/SCRIPTS/process.sh Mon Nov 17 13:00:08 2014 +0000 @@ -224,6 +224,13 @@ fi } +plugin_dir_for() { + dir="$1" + if grep -q "^$dir: " METADATA/plugindir.txt ; then + echo "$dir"/$(grep "^$dir: " METADATA/plugindir.txt | head -1 | sed 's/^[^:]*: //') + fi +} + logfile_for() { activity="$1" dir="$2" @@ -304,9 +311,10 @@ plugin_ids_in() { dir="$1" + pdir=$(plugin_dir_for "$dir") # can't use sed to remove \r from DOS line endings -- BSD and GNU # vary in how they interpret \r escape -- so we use perl for that... - VAMP_PATH="$dir" $hostwrapper \ + VAMP_PATH="$dir:$pdir" $hostwrapper \ vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids | \ grep '^vamp:' | \ sed 's/^vamp://' | \ @@ -318,6 +326,7 @@ dir="$1" log=$(logfile_for test "$dir") ids=$(plugin_ids_in "$dir") + pdir=$(plugin_dir_for "$dir") cat /dev/null > "$log" if [ -z "$ids" ]; then echo @@ -331,13 +340,13 @@ if is_nondeterministic "$id"; then extra="-n" fi - echo "Running command: VAMP_PATH=\"$dir\" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext \"$extra\" \"$id\"" | tee -a "$log" - if ( VAMP_PATH="$dir" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext "$extra" "$id" 2>&1 | tee -a "$log" ; exit ${PIPESTATUS[0]} ) ; then + echo "Running command: VAMP_PATH=\"$dir:$pdir\" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext \"$extra\" \"$id\"" | tee -a "$log" + if ( VAMP_PATH="$dir:$pdir" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext "$extra" "$id" 2>&1 | tee -a "$log" ; exit ${PIPESTATUS[0]} ) ; then echo "OK" | tee -a "$log" else echo | tee -a "$log" echo "Tester failed for id $id: running again with valgrind (if available) and verbose for a report..." | tee -a "$log" - VAMP_PATH="$dir" $valgrind $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext -v "$extra" "$id" 2>&1 | tee -a "$log" + VAMP_PATH="$dir:$pdir" $valgrind $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext -v "$extra" "$id" 2>&1 | tee -a "$log" good=no fi done @@ -391,8 +400,9 @@ env_test_stdout() { dir="$1" log=$(logfile_for envtest "$dir") + pdir=$(plugin_dir_for "$dir") good=yes - ids=$(VAMP_PATH="$dir" $hostwrapper vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids); + ids=$(VAMP_PATH="$dir:$pdir" $hostwrapper vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids); echo echo "Testing for any unwanted output to stdout..." for id in $ids; do @@ -410,11 +420,13 @@ env_test_cat() { dir="$1" log=$(logfile_for envtest "$dir") + pdir=$(plugin_dir_for "$dir") + cdir=$(if test -n "$pdir" ; then echo "$pdir" ; else echo "$dir" ; fi) good=yes first=yes echo echo "Testing some details of .cat files..." - for catfile in "$dir"/*".cat"; do + for catfile in "$cdir"/*".cat"; do if [ ! -f "$catfile" ]; then # This should only happen if the glob was not expanded at all echo "ERROR: no .cat file found in $dir" | tee -a "$log" @@ -424,12 +436,12 @@ if [ "$first" = "yes" ]; then first=no else - echo "NOTE: multiple .cat files found in $dir" | tee -a "$log" + echo "NOTE: multiple .cat files found in $cdir" | tee -a "$log" fi done if [ "$good" = "yes" ]; then excess=$(plugin_ids_in "$dir" | sed 's/^/vamp:/' | \ - cat "$dir"/*".cat" - | \ + cat "$cdir"/*".cat" - | \ sed 's/::.*//' | \ sort | \ uniq -u) @@ -446,11 +458,13 @@ env_test_ttl() { dir="$1" log=$(logfile_for envtest "$dir") + pdir=$(plugin_dir_for "$dir") + rdir=$(if test -n "$pdir" ; then echo "$pdir" ; else echo "$dir" ; fi) good=yes first=yes echo echo "Testing existence of RDF files..." - for ttlfile in "$dir"/*.{n3,ttl}; do + for ttlfile in "$rdir"/*.{n3,ttl}; do if [ ! -f "$ttlfile" ]; then # Because we have two different extensions, this isn't an # error as it is with e.g. .cat (because one or the other @@ -461,10 +475,11 @@ elif [ "$first" = "yes" ]; then first=no else - echo "NOTE: multiple .ttl or .n3 files found in $dir" | tee -a "$log" + echo "NOTE: multiple .ttl or .n3 files found in $rdir" | tee -a "$log" fi done - if [ "$first" = "yes" ]; then + if [ "$first" = "yes" ]; then + echo "ERROR: no .ttl or .n3 files found in $rdir" | tee -a "$log" good=no; else echo "GOOD: found one or more .ttl or .n3 files (we don't actually test their validity or content here though)" | tee -a "$log"