summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/tools')
-rwxr-xr-xwebkit/tools/layout_tests/run_webkit_tests.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/webkit/tools/layout_tests/run_webkit_tests.sh b/webkit/tools/layout_tests/run_webkit_tests.sh
index 6ac6696..e1994bf 100755
--- a/webkit/tools/layout_tests/run_webkit_tests.sh
+++ b/webkit/tools/layout_tests/run_webkit_tests.sh
@@ -1,9 +1,19 @@
#!/bin/sh
-system_root=`cygpath "$SYSTEMROOT"`
-export PATH="/usr/bin:$system_root/system32:$system_root:$system_root/system32/WBEM"
-
exec_dir=$(dirname $0)
-"$exec_dir/../../../third_party/python_24/python.exe" \
- "$exec_dir/run_webkit_tests.py" "$@"
+if [ "$OSTYPE" = "cygwin" ]; then
+ system_root=`cygpath "$SYSTEMROOT"`
+ PATH="/usr/bin:$system_root/system32:$system_root:$system_root/system32/WBEM"
+ export PATH
+ PYTHON_PROG="$exec_dir/../../../third_party/python_24/python.exe"
+else
+ PYTHON_PROG=python
+ # When not using the included python, we don't get automatic site.py paths.
+ # Specifically, run_webkit_tests needs the paths in:
+ # third_party/python_24/Lib/site-packages/google.pth
+ PYTHONPATH="$(readlink -f ${exec_dir}/../../../tools/python):$PYTHONPATH"
+ export PYTHONPATH
+fi
+
+"$PYTHON_PROG" "$exec_dir/run_webkit_tests.py" "$@"