diff options
-rw-r--r-- | chrome/test/ui/ui_test.cc | 18 | ||||
-rwxr-xr-x | tools/valgrind/chrome_tests.py | 29 | ||||
-rwxr-xr-x | tools/valgrind/chrome_tests.sh | 2 | ||||
-rw-r--r-- | webkit/tools/layout_tests/rebaseline.bat | 2 | ||||
-rwxr-xr-x | webkit/tools/layout_tests/rebaseline.sh | 9 | ||||
-rw-r--r-- | webkit/tools/layout_tests/run_webkit_tests.bat | 2 | ||||
-rwxr-xr-x | webkit/tools/layout_tests/run_webkit_tests.sh | 6 |
7 files changed, 42 insertions, 26 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 13043cf..12846c6 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -260,13 +260,12 @@ static CommandLine* CreateHttpServerCommandLine() { PathService::Get(base::DIR_SOURCE_ROOT, &src_path); FilePath script_path(src_path); - script_path = script_path.AppendASCII("third_party"); - script_path = script_path.AppendASCII("WebKit"); - script_path = script_path.AppendASCII("WebKitTools"); - script_path = script_path.AppendASCII("Scripts"); + script_path = script_path.AppendASCII("webkit"); + script_path = script_path.AppendASCII("tools"); + script_path = script_path.AppendASCII("layout_tests"); script_path = script_path.AppendASCII("webkitpy"); script_path = script_path.AppendASCII("layout_tests"); - script_path = script_path.AppendASCII("port"); + script_path = script_path.AppendASCII("layout_package"); script_path = script_path.AppendASCII("http_server.py"); CommandLine* cmd_line = CreatePythonCommandLine(); @@ -280,13 +279,12 @@ static CommandLine* CreateWebSocketServerCommandLine() { PathService::Get(base::DIR_SOURCE_ROOT, &src_path); FilePath script_path(src_path); - script_path = script_path.AppendASCII("third_party"); - script_path = script_path.AppendASCII("WebKit"); - script_path = script_path.AppendASCII("WebKitTools"); - script_path = script_path.AppendASCII("Scripts"); + script_path = script_path.AppendASCII("webkit"); + script_path = script_path.AppendASCII("tools"); + script_path = script_path.AppendASCII("layout_tests"); script_path = script_path.AppendASCII("webkitpy"); script_path = script_path.AppendASCII("layout_tests"); - script_path = script_path.AppendASCII("port"); + script_path = script_path.AppendASCII("layout_package"); script_path = script_path.AppendASCII("websocket_server.py"); CommandLine* cmd_line = CreatePythonCommandLine(); diff --git a/tools/valgrind/chrome_tests.py b/tools/valgrind/chrome_tests.py index ac540e4..ab0ff66 100755 --- a/tools/valgrind/chrome_tests.py +++ b/tools/valgrind/chrome_tests.py @@ -17,6 +17,16 @@ import sys import google.logging_utils import google.path_utils +# Import the platform_utils up in the layout tests which have been modified to +# work under non-Windows platforms instead of the ones that are in the +# tools/python/google directory. (See chrome_tests.sh which sets PYTHONPATH +# correctly.) +# +# TODO(erg): Copy/Move the relevant functions from the layout_package version +# of platform_utils back up to google.platform_utils +# package. http://crbug.com/6164 +import layout_package.path_utils + import common import valgrind_test @@ -90,8 +100,9 @@ class ChromeTests: # relative to the top of the tree. self._source_dir = os.path.dirname(os.path.dirname(script_dir)) # since this path is used for string matching, make sure it's always - # an absolute Unix-style path - self._source_dir = os.path.abspath(self._source_dir).replace('\\', '/') + # an absolute Windows-style path + self._source_dir = layout_package.path_utils.get_absolute_path( + self._source_dir) valgrind_test_script = os.path.join(script_dir, "valgrind_test.py") self._command_preamble = [valgrind_test_script, "--source_dir=%s" % (self._source_dir)] @@ -276,14 +287,14 @@ class ChromeTests: # # Build the ginormous commandline in 'cmd'. # It's going to be roughly - # python valgrind_test.py ... python run-chromium-webkit-tests ... + # python valgrind_test.py ... python run_webkit_tests.py ... # but we'll use the --indirect flag to valgrind_test.py # to avoid valgrinding python. # Start by building the valgrind_test.py commandline. cmd = self._DefaultCommand("webkit") cmd.append("--trace_children") cmd.append("--indirect") - # Now build script_cmd, the run_chromium-webkits_tests commandline + # Now build script_cmd, the run_webkits_tests.py commandline # Store each chunk in its own directory so that we can find the data later chunk_dir = os.path.join("layout", "chunk_%05d" % chunk_num) test_shell = os.path.join(self._options.build_dir, "test_shell") @@ -295,14 +306,14 @@ class ChromeTests: os.remove(f) else: os.makedirs(out_dir) - script = os.path.join(self._source_dir, "third_party", "WebKit", - "WebKitTools", "Scripts", "run-chromium-webkit-tests") + script = os.path.join(self._source_dir, "webkit", "tools", "layout_tests", + "run_webkit_tests.py") script_cmd = ["python", script, "--run-singly", "-v", "--noshow-results", "--time-out-ms=200000", "--nocheck-sys-deps"] - # Pass build mode to run-chromium-webkit-tests. We aren't passed it - # directly, so parse it out of build_dir. run-chromium-webkit-tests - # can only handle the two values "Release" and "Debug". + # Pass build mode to run_webkit_tests.py. We aren't passed it directly, + # so parse it out of build_dir. run_webkit_tests.py can only handle + # the two values "Release" and "Debug". # TODO(Hercules): unify how all our scripts pass around build mode # (--mode / --target / --build_dir / --debug) if self._options.build_dir.endswith("Debug"): diff --git a/tools/valgrind/chrome_tests.sh b/tools/valgrind/chrome_tests.sh index d870deb..dd3a6b3 100755 --- a/tools/valgrind/chrome_tests.sh +++ b/tools/valgrind/chrome_tests.sh @@ -22,4 +22,4 @@ PATH="${CHROME_VALGRIND}/bin:$PATH" export VALGRIND_LIB="$CHROME_VALGRIND/lib/valgrind" export VALGRIND_LIB_INNER="$CHROME_VALGRIND/lib/valgrind" -PYTHONPATH=$THISDIR/../../third_party/WebKit/WebKitTools/Scripts/webkitpy/layout_tests:$THISDIR/../python "$THISDIR/chrome_tests.py" "$@" +PYTHONPATH=$THISDIR/../../webkit/tools/layout_tests/webkitpy/layout_tests:$THISDIR/../python "$THISDIR/chrome_tests.py" "$@" diff --git a/webkit/tools/layout_tests/rebaseline.bat b/webkit/tools/layout_tests/rebaseline.bat index ea8d68f..25ca06f 100644 --- a/webkit/tools/layout_tests/rebaseline.bat +++ b/webkit/tools/layout_tests/rebaseline.bat @@ -1 +1 @@ -%~dp0..\..\..\third_party\python_24\python.exe %~dp0\..\..\..\third_party\WebKit\WebKitTools\Scripts\rebaseline-chromium-webkit-tests %* +%~dp0..\..\..\third_party\python_24\python.exe %~dp0\webkitpy\layout_tests\rebaseline_chromium_webkit_tests.py %* diff --git a/webkit/tools/layout_tests/rebaseline.sh b/webkit/tools/layout_tests/rebaseline.sh index bac48c4..771169d 100755 --- a/webkit/tools/layout_tests/rebaseline.sh +++ b/webkit/tools/layout_tests/rebaseline.sh @@ -1,11 +1,16 @@ #!/bin/sh -# Copyright (c) 2009, 2010 The Chromium Authors. All rights reserved. +# 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) PYTHON_PROG=python +# When not using the included python, we don't get automatic site.py paths. +# Specifically, rebaseline.py needs the paths in: +# third_party/python_24/Lib/site-packages/google.pth +PYTHONPATH="${exec_dir}/../../../tools/python:$PYTHONPATH" +export PYTHONPATH -"$PYTHON_PROG" "$exec_dir/../../../third_party/WebKit/WebKitTools/Scripts/rebaseline-chromium-webkit-tests" "$@" +"$PYTHON_PROG" "$exec_dir/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py" "$@" diff --git a/webkit/tools/layout_tests/run_webkit_tests.bat b/webkit/tools/layout_tests/run_webkit_tests.bat index 4bce6b8..91fee71 100644 --- a/webkit/tools/layout_tests/run_webkit_tests.bat +++ b/webkit/tools/layout_tests/run_webkit_tests.bat @@ -1 +1 @@ -@%~dp0\..\..\..\third_party\python_24\python.exe %~dp0\..\..\..\third_party\WebKit\WebKitTools\Scripts\run-chromium-webkit-tests %* +@%~dp0\..\..\..\third_party\python_24\python.exe %~dp0\run_webkit_tests.py %* diff --git a/webkit/tools/layout_tests/run_webkit_tests.sh b/webkit/tools/layout_tests/run_webkit_tests.sh index 653110f..4dcb3fc 100755 --- a/webkit/tools/layout_tests/run_webkit_tests.sh +++ b/webkit/tools/layout_tests/run_webkit_tests.sh @@ -5,7 +5,6 @@ # found in the LICENSE file. exec_dir=$(dirname $0) -script_dir=${exec_dir}/../../../third_party/WebKit/WebKitTools/Scripts if [ "$OSTYPE" = "cygwin" ]; then system_root=`cygpath "$SYSTEMROOT"` @@ -14,7 +13,10 @@ if [ "$OSTYPE" = "cygwin" ]; then PYTHON_PROG="$exec_dir/../../../third_party/python_24/python.exe" else PYTHON_PROG=python + # Specifically, run_webkit_tests needs the paths in: + # third_party/python_24/Lib/site-packages/google.pth + PYTHONPATH="${exec_dir}/../../../tools/python:$PYTHONPATH" export PYTHONPATH fi -"$PYTHON_PROG" "$script_dir/run-chromium-webkit-tests" "$@" +"$PYTHON_PROG" "$exec_dir/run_webkit_tests.py" "$@" |