summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-11 01:42:37 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-11 01:42:37 +0000
commit2eefbcb0bb6d8b61cd0b426ff28abd150ae25eca (patch)
tree0423ece3a7cf8dde5369ce328d7951fd3f52c8af
parent57d0ff6dfceeb1a273acc9becd34055031700d8a (diff)
downloadchromium_src-2eefbcb0bb6d8b61cd0b426ff28abd150ae25eca.zip
chromium_src-2eefbcb0bb6d8b61cd0b426ff28abd150ae25eca.tar.gz
chromium_src-2eefbcb0bb6d8b61cd0b426ff28abd150ae25eca.tar.bz2
Add a script to 'run_http_server' in src/webkit/tools/layout_tests. Just a wrapper over the real tool in src/third_party/WebKit/WebKitTools/Scripts/
TEST=none BUG=none Review URL: http://codereview.chromium.org/781003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41235 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/tools/layout_tests/run_http_server.bat1
-rw-r--r--webkit/tools/layout_tests/run_http_server.py25
-rwxr-xr-xwebkit/tools/layout_tests/run_http_server.sh22
3 files changed, 48 insertions, 0 deletions
diff --git a/webkit/tools/layout_tests/run_http_server.bat b/webkit/tools/layout_tests/run_http_server.bat
new file mode 100644
index 0000000..c0dd160
--- /dev/null
+++ b/webkit/tools/layout_tests/run_http_server.bat
@@ -0,0 +1 @@
+@%~dp0\..\..\..\third_party\python_24\python.exe %~dp0\run_http_server.py %*
diff --git a/webkit/tools/layout_tests/run_http_server.py b/webkit/tools/layout_tests/run_http_server.py
new file mode 100644
index 0000000..45c8040
--- /dev/null
+++ b/webkit/tools/layout_tests/run_http_server.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Wrapper around
+ third_party/WebKit/WebKitTools/Scripts/new-run-webkit-httpd"""
+import os
+import subprocess
+import sys
+
+def main():
+ cmd = [sys.executable]
+ src_dir=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(
+ os.path.dirname(os.path.abspath(sys.argv[0]))))))
+ script_dir=os.path.join(src_dir, "third_party", "WebKit", "WebKitTools",
+ "Scripts")
+ script = os.path.join(script_dir, 'new-run-webkit-httpd')
+ cmd.append(script)
+ cmd.extend(sys.argv[1:])
+ return subprocess.call(cmd)
+
+if __name__ == '__main__':
+ sys.exit(main())
+
diff --git a/webkit/tools/layout_tests/run_http_server.sh b/webkit/tools/layout_tests/run_http_server.sh
new file mode 100755
index 0000000..36e2812
--- /dev/null
+++ b/webkit/tools/layout_tests/run_http_server.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+exec_dir=$(dirname $0)
+
+if [ "$OSTYPE" = "cygwin" ]; then
+ system_root=`cygpath "$SYSTEMROOT"`
+ PATH="/usr/bin:$system_root/system32:$system_root:$system_root/system32/WBEM"
+ export PATH
+ unset PYTHONPATH
+ PYTHON_PROG="$exec_dir/../../../third_party/python_24/python.exe"
+ SCRIPT=$(cygpath -wa "$exec_dir/run_http_server.py")
+else
+ PYTHON_PROG=python
+ unset PYTHONPATH
+ SCRIPT="$exec_dir/run_http_server.py"
+fi
+
+"$PYTHON_PROG" "$SCRIPT" "$@"