changeset 96:e24202b02c69

Path separator
author Chris Cannam
date Wed, 12 Aug 2015 15:23:57 +0100
parents 5addbcdc2e87
children 1c31fd7b4cb5
files SCRIPTS/process.sh
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/SCRIPTS/process.sh	Tue Apr 21 12:40:12 2015 +0100
+++ b/SCRIPTS/process.sh	Wed Aug 12 15:23:57 2015 +0100
@@ -70,6 +70,7 @@
 valgrind=
 archflags=
 identpattern=
+sep=":"
 
 case "$platform_arg" in
     linux32)
@@ -92,6 +93,7 @@
 	hostwrapper=wine
 	hostext=.exe
 	identpattern='PE32.*386.*Windows'
+	sep=";"
 	;;
     mingw64)
 	platform=mingw
@@ -102,6 +104,7 @@
 	hostwrapper=wine
 	hostext=.exe
 	identpattern='PE32.*x86-64.*Windows'
+	sep=";"
 	;;
     osx32)
 	platform=osx
@@ -236,7 +239,10 @@
     local dir="$1"
     local pdir=$(plugin_dir_for "$dir")
     if [ -z "$pdir" ]; then
-	pdir="${mydir}/../${dir}"
+	case "$dir" in
+	    /*) pdir="$dir" ;;
+	    *) pdir="${mydir}/../${dir}";;
+	esac
     fi
     find "$pdir" -name \*.py -print0 | xargs -0 grep -l 'import.*\bvampy\b'
 }
@@ -354,7 +360,7 @@
     fi
     # 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:$pdir:$vampydir" $hostwrapper \
+    VAMP_PATH="$dir$sep$pdir$sep$vampydir" $hostwrapper \
 	vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids | \
 	grep '^vamp:' | \
 	sed 's/^vamp://' | \
@@ -380,8 +386,8 @@
 	if is_nondeterministic "$id"; then
 	    extra="-n"
 	fi
-	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:./vampy" $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$sep$pdir\" $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext \"$extra\" \"$id\"" | tee -a "$log"
+	if ( VAMP_PATH="$dir$sep$pdir$sep./vampy" $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
 	    if have_vampy_plugins "$pdir"; then # (don't attempt vampy+valgrind)
@@ -390,7 +396,7 @@
 	    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:$pdir:./vampy" $valgrind $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext -v "$extra" "$id" 2>&1 | tee -a "$log"
+		VAMP_PATH="$dir$sep$pdir$sep./vampy" $valgrind $hostwrapper vamp-plugin-tester/vamp-plugin-tester$hostext -v "$extra" "$id" 2>&1 | tee -a "$log"
 	    fi
 	    good=no
 	fi
@@ -447,7 +453,7 @@
     local log=$(logfile_for envtest "$dir")
     local pdir=$(plugin_dir_for "$dir")
     local good=yes
-    local ids=$(VAMP_PATH="$dir:$pdir" $hostwrapper vamp-plugin-sdk/host/vamp-simple-host$hostext --list-ids);
+    local ids=$(VAMP_PATH="$dir$sep$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