From 68d7f638d934050e6fa3f6be753f1d2c437b1f4f Mon Sep 17 00:00:00 2001 From: "mmoss@google.com" Date: Wed, 12 Nov 2008 19:42:24 +0000 Subject: 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 --- webkit/tools/layout_tests/run_webkit_tests.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'webkit/tools') 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" "$@" -- cgit v1.1