File indexing completed on 2019-05-10 20:00:19
e39e8a172… Dimi*0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
360a3f914… Jona*0022
e39e8a172… Dimi*0023
0024
0025 usage()
0026 {
2837103fe… Fran*0027 cat >&2 <<EOF
e39e8a172… Dimi*0028
443bfc99a… Dyla*0029 Usage: $0 [options] [input_file]
e39e8a172… Dimi*0030
6d1b4af58… Jeff*0031 input_file: the source code for the test program
0032
e39e8a172… Dimi*0033 Options:
0034 -q quiet mode
0035 -v verbose mode (can be specified multiple times)
baac2a6c5… Jörg*0036 -i interactive mode (runs even more tests)
e39e8a172… Dimi*0037 -s announce successful tests
0038 -p prog name of the program to run for C tests
0039 -P name set the current platform name
0040 -M names set the module names to be tested
0041 -T dir set Wine tree top directory (autodetected if not specified)
0042
0043 EOF
0044 exit 1
0045 }
0046
0047
0048 platform=$WINETEST_PLATFORM
0049 WINETEST_DEBUG=${WINETEST_DEBUG:-1}
0050
0051
a9b2ee2af… Dyla*0052 while [ "$#" -gt 0 ]; do
e39e8a172… Dimi*0053 case "$1" in
0054 -h)
0055 usage
0056 ;;
0057 -p)
0058 shift; program="$1"
0059 ;;
0060 -q)
0061 WINETEST_DEBUG=0
0062 ;;
0063 -v)
0064 WINETEST_DEBUG=`expr $WINETEST_DEBUG + 1`
0065 ;;
baac2a6c5… Jörg*0066 -i)
0067 WINETEST_INTERACTIVE=1
0068 export WINETEST_INTERACTIVE
0069 ;;
e39e8a172… Dimi*0070 -s)
0071 WINETEST_REPORT_SUCCESS=1
0072 export WINETEST_REPORT_SUCCESS
0073 ;;
0074 -P)
0075 shift; platform="$1"
0076 ;;
0077 -M)
0078 shift; modules="$1"
0079 ;;
0080 -T)
0081 shift; topobjdir="$1"
3efdf38fc… Fran*0082 if [ ! -d "$topobjdir" ]; then usage; fi
0083 ;;
a9b2ee2af… Dyla*0084 *)
3efdf38fc… Fran*0085 break
e39e8a172… Dimi*0086 ;;
0087 esac
0088 shift
0089 done
0090
0091 if [ -z "$program" ]; then
634052e4d… Dyla*0092
0093 working_path=`pwd`
96346ed62… Alex*0094 case $working_path in
0095 */dlls/*/tests)
0096 parent_path=`dirname "$working_path"`
1459a0105… Alex*0097 program=`basename "$parent_path"`_test.exe
96346ed62… Alex*0098 ;;
0099 */dlls/*)
1459a0105… Alex*0100 program=tests/`basename "$working_path"`_test.exe
96346ed62… Alex*0101 ;;
0102 */programs/*/tests)
0103 parent_path=`dirname "$working_path"`
1459a0105… Alex*0104 program=`basename "$parent_path"`.exe_test.exe
96346ed62… Alex*0105 ;;
0106 */programs/*)
1459a0105… Alex*0107 program=tests/`basename "$working_path"`.exe_test.exe
96346ed62… Alex*0108 ;;
0109 esac
1459a0105… Alex*0110 test -f "$program" || program="$program".so
634052e4d… Dyla*0111 fi
1459a0105… Alex*0112
634052e4d… Dyla*0113 if [ ! -f "$program" ]; then
0114 echo "Can't find the test program, use the -p argument to specify one" 1>&2
0115 usage
e39e8a172… Dimi*0116 fi
0117
0118
0119 if [ -n "$topobjdir" ]; then
3efdf38fc… Fran*0120 if [ ! -f "$topobjdir/server/wineserver" ]
0121 then
634052e4d… Dyla*0122 echo "Wrong -T argument, $topobjdir/server/wineserver does not exist" 1>&2
e39e8a172… Dimi*0123 usage
0124 fi
0125 else
0126 if [ -f "./server/wineserver" ]; then topobjdir="."
0127 elif [ -f "../server/wineserver" ]; then topobjdir=".."
0128 elif [ -f "../../server/wineserver" ]; then topobjdir="../.."
0129 elif [ -f "../../../server/wineserver" ]; then topobjdir="../../.."
8d88fe6d4… Dyla*0130 else
634052e4d… Dyla*0131 echo "Can't find the top of the Wine tree (use the -T argument)" 1>&2
8d88fe6d4… Dyla*0132 usage
e39e8a172… Dimi*0133 fi
0134 fi
0135
0136
0137
2052538a4… Alex*0138 if [ -n "$modules" ]; then
0139 WINEDLLOVERRIDES="$WINEDLLOVERRIDES;$modules=b"
0140 export WINEDLLOVERRIDES
e39e8a172… Dimi*0141 fi
0142 WINETEST_PLATFORM=${platform:-wine}
0143 export WINETEST_PLATFORM WINETEST_DEBUG
0144
d18cd8956… Dan *0145
0146
0147
0148
0149
0150
443bfc99a… Dyla*0151 exec $WINETEST_WRAPPER "$topobjdir/wine" "$program" "$@"