Alexandre Julliard : runtest: Fix handling of test binaries in the programs directory.

Alexandre Julliard julliard at winehq.org
Mon Feb 15 10:06:13 CST 2010


Module: wine
Branch: master
Commit: 96346ed62ef1d51df38f5073309172bb58c68c82
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=96346ed62ef1d51df38f5073309172bb58c68c82

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Feb 15 12:49:08 2010 +0100

runtest: Fix handling of test binaries in the programs directory.

---

 tools/runtest |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/tools/runtest b/tools/runtest
index 86f8680..79bd2f7 100755
--- a/tools/runtest
+++ b/tools/runtest
@@ -91,14 +91,22 @@ done
 if [ -z "$program" ]; then
     # try to autodetect the test program name based on the working directory
     working_path=`pwd`
-    working_basename=`basename "$working_path"`
-    if [ "$working_basename" = "tests" ]; then
-        parent_path=`dirname "$working_path"`
-        parent_basename=`basename "$parent_path"`
-        program="${parent_basename}_test.exe.so"
-    elif [ -d "tests" ]; then
-        program="tests/${working_basename}_test.exe.so"
-    fi
+    case $working_path in
+        */dlls/*/tests)
+          parent_path=`dirname "$working_path"`
+          program=`basename "$parent_path"`_test.exe.so
+          ;;
+        */dlls/*)
+          program=tests/`basename "$working_path"`_test.exe.so
+          ;;
+        */programs/*/tests)
+          parent_path=`dirname "$working_path"`
+          program=`basename "$parent_path"`.exe_test.exe.so
+          ;;
+        */programs/*)
+          program=tests/`basename "$working_path"`.exe_test.exe.so
+          ;;
+    esac
 fi
 if [ ! -f "$program" ]; then
     echo "Can't find the test program, use the -p argument to specify one" 1>&2




More information about the wine-cvs mailing list