summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/tools')
-rw-r--r--webkit/tools/layout_tests/layout_package/platform_utils_linux.py27
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()