summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
authormmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-12 19:42:24 +0000
committermmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-12 19:42:24 +0000
commit68d7f638d934050e6fa3f6be753f1d2c437b1f4f (patch)
tree746fe64b67869fd5d510a9f1d0b5f1109ed8e301 /webkit/tools
parentfbe9feca244761a0c88436effdaaf7282b404cad (diff)
downloadchromium_src-68d7f638d934050e6fa3f6be753f1d2c437b1f4f.zip
chromium_src-68d7f638d934050e6fa3f6be753f1d2c437b1f4f.tar.gz
chromium_src-68d7f638d934050e6fa3f6be753f1d2c437b1f4f.tar.bz2
Make run_webkit_tests.sh multi-platform.
This is part of getting LayoutTests running on Linux. BUG=4281 Review URL: http://codereview.chromium.org/10280 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5279 0039d316-1c4b-4281-b951-d872f2087c98
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" "$@"