When removing an item which is event-insensitive, there is no need to repick the...
[ardour.git] / tools / windows_packaging / wine-ardour-tests.sh
index 22a887624189bbd4942a3a74b189a68ca24c6059..a4bd033c8b20472aa9e53ec81a177ab09a9d1a5e 100755 (executable)
@@ -2,4 +2,28 @@
 
 . ./wine-env.sh
 
-wine run-tests.exe
+if [ "$1" == "--list" ]; then
+       TESTS='test_*'
+       for test_program in `find  -name "$TESTS" -type f -perm /u+x`;
+       do
+               echo "$test_program"
+       done
+       exit 0
+fi
+
+if [ "$1" == "--single" ] || [ "$2" == "--single" ]; then
+        if [ "$1" == "--single" ]; then
+               TESTS="test_*$2*"
+        elif [ "$2" == "--single" ]; then
+               TESTS="test_*$3*"
+       else
+                TESTS='test_*'
+        fi
+       for test_program in `find . -name "$TESTS" -type f -perm /u+x`;
+       do
+               echo "Running $test_program..."
+               wine "$test_program"
+       done
+else
+        wine run-tests.exe
+fi