diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-08 01:52:58 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-08 01:52:58 +0000 |
commit | f469b0a1edadfd68a86fd045490faa4fb352a503 (patch) | |
tree | e5006d2ca40136b9c8852f3a805243703fbe0843 /webkit/tools | |
parent | 0e9f4ee56fac076c7128c746d48a53720ea3f4e2 (diff) | |
download | chromium_src-f469b0a1edadfd68a86fd045490faa4fb352a503.zip chromium_src-f469b0a1edadfd68a86fd045490faa4fb352a503.tar.gz chromium_src-f469b0a1edadfd68a86fd045490faa4fb352a503.tar.bz2 |
Linux: warning when not running most recent test_shell
With the scons GYP switch, you now have to pass --debug to
run_layout_tests.sh to run the debug build otherwise you'll silently
be running the wrong binary. Warning loudly about this.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13333 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/layout_tests/layout_package/platform_utils_linux.py | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/webkit/tools/layout_tests/layout_package/platform_utils_linux.py b/webkit/tools/layout_tests/layout_package/platform_utils_linux.py index 62e236d..4708bb4 100644 --- a/webkit/tools/layout_tests/layout_package/platform_utils_linux.py +++ b/webkit/tools/layout_tests/layout_package/platform_utils_linux.py @@ -10,6 +10,7 @@ import re import signal import subprocess import sys +import logging import google.path_utils @@ -173,6 +174,27 @@ class PlatformUtility(object): Args: target: Build target mode (debug or release) """ + + if target in ('Debug', 'Release'): + debug_path = PathFromBase('sconsbuild', 'Debug', self.TestShellBinary()) + release_path = PathFromBase('sconsbuild', 'Release', \ + self.TestShellBinary()) + try: + debug_mtime = os.stat(debug_path).st_mtime + release_mtime = os.stat(release_path).st_mtime + + if debug_mtime > release_mtime and target == 'Release' or \ + release_mtime > debug_mtime and target == 'Debug': + logging.info('\x1b[31mWarning: you are not running the most ' + \ + 'recent test_shell binary. You need to pass ' + \ + '--debug or not to select between Debug and ' + \ + 'Release.\x1b[0m') + except OSError: + # This will fail if we don't have both a debug and release binary. + # That's fine because, in this case, we must already be running the + # most up-to-date one. + pass + return PathFromBase('sconsbuild', target, self.TestShellBinary()) def FuzzyMatchBinaryPath(self): @@ -192,4 +214,4 @@ class PlatformUtility(object): def PlatformNewResultsDir(self): """Returns the directory name in which to output newly baselined tests. """ - return self.PlatformDir()
\ No newline at end of file + return self.PlatformDir() |