runtest: search also for Applicationtests (try 2)
André Hentschel
nerv at dawncrow.de
Thu Feb 11 09:33:40 CST 2010
---
tools/runtest | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/tools/runtest b/tools/runtest
index 86f8680..9ecbc89 100755
--- a/tools/runtest
+++ b/tools/runtest
@@ -6,6 +6,7 @@
#
# Copyright 2002 Alexandre Julliard
# Copyright 2002 Dimitrie O. Paun
+# Copyright 2010 André Hentschel
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -92,12 +93,19 @@ if [ -z "$program" ]; then
# try to autodetect the test program name based on the working directory
working_path=`pwd`
working_basename=`basename "$working_path"`
+ parent_path=`dirname "$working_path"`
+ parent_basename=`basename "$parent_path"`
+ type_path=`dirname "$parent_path"`
+ type_basename=`basename "$type_path"`
+ if [ "$type_basename" = "programs" ]; then
+ type=".exe"
+ elif [ -d "tests" ]; then
+ type=""
+ fi
if [ "$working_basename" = "tests" ]; then
- parent_path=`dirname "$working_path"`
- parent_basename=`basename "$parent_path"`
- program="${parent_basename}_test.exe.so"
+ program="${parent_basename}${type}_test.exe.so"
elif [ -d "tests" ]; then
- program="tests/${working_basename}_test.exe.so"
+ program="tests/${working_basename}${type}_test.exe.so"
fi
fi
if [ ! -f "$program" ]; then
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list