Commit 96346ed6 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent bd5f4637
...@@ -91,14 +91,22 @@ done ...@@ -91,14 +91,22 @@ done
if [ -z "$program" ]; then if [ -z "$program" ]; then
# try to autodetect the test program name based on the working directory # try to autodetect the test program name based on the working directory
working_path=`pwd` working_path=`pwd`
working_basename=`basename "$working_path"` case $working_path in
if [ "$working_basename" = "tests" ]; then */dlls/*/tests)
parent_path=`dirname "$working_path"` parent_path=`dirname "$working_path"`
parent_basename=`basename "$parent_path"` program=`basename "$parent_path"`_test.exe.so
program="${parent_basename}_test.exe.so" ;;
elif [ -d "tests" ]; then */dlls/*)
program="tests/${working_basename}_test.exe.so" program=tests/`basename "$working_path"`_test.exe.so
fi ;;
*/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 fi
if [ ! -f "$program" ]; then if [ ! -f "$program" ]; then
echo "Can't find the test program, use the -p argument to specify one" 1>&2 echo "Can't find the test program, use the -p argument to specify one" 1>&2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment