diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-08 16:29:30 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-08 16:29:30 +0000 |
commit | 53f0cd2f4a2fef445068a0b08d440e67d964c642 (patch) | |
tree | a445b4b6299946055dff853c883a9b78e5d2c767 /webkit/tools | |
parent | 5d8a05fc99294af3df05fe5b7bf873a0edd0eaef (diff) | |
download | chromium_src-53f0cd2f4a2fef445068a0b08d440e67d964c642.zip chromium_src-53f0cd2f4a2fef445068a0b08d440e67d964c642.tar.gz chromium_src-53f0cd2f4a2fef445068a0b08d440e67d964c642.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.
http://codereview.chromium.org/62137
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/layout_tests/layout_package/platform_utils_linux.py | 27 |
1 files changed, 26 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..18c0743 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,30 @@ class PlatformUtility(object): Args: target: Build target mode (debug or release) """ + + if target in ('Debug', 'Release'): + try: + debug_path = PathFromBase('sconsbuild', 'Debug', self.TestShellBinary()) + release_path = PathFromBase('sconsbuild', 'Release', \ + self.TestShellBinary()) + + 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') + # 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. + except OSError: + pass + except google.path_utils.PathNotFound: + pass + return PathFromBase('sconsbuild', target, self.TestShellBinary()) def FuzzyMatchBinaryPath(self): @@ -192,4 +217,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() |