Index: build/android/pylib/gtest/test_package_exe.py |
diff --git a/build/android/pylib/gtest/test_package_exe.py b/build/android/pylib/gtest/test_package_exe.py |
index 02330f036f33c3df46e058464ed6a2d8154924bd..b73ff0f6550353fcf225101d81c7d1abf3069a3d 100644 |
--- a/build/android/pylib/gtest/test_package_exe.py |
+++ b/build/android/pylib/gtest/test_package_exe.py |
@@ -122,26 +122,21 @@ class TestPackageExecutable(TestPackage): |
if self.tool.NeedsDebugInfo(): |
target_name = self.suite_path |
else: |
- target_name = self.suite_path + '_' + adb.GetDevice() + '_stripped' |
- should_strip = True |
- if os.path.isfile(target_name): |
- logging.info('Found target file %s' % target_name) |
- target_mtime = os.stat(target_name).st_mtime |
- source_mtime = os.stat(self.suite_path).st_mtime |
- if target_mtime > source_mtime: |
- logging.info('Target mtime (%d) is newer than source (%d), assuming ' |
- 'no change.' % (target_mtime, source_mtime)) |
- should_strip = False |
- |
- if should_strip: |
- logging.info('Did not find up-to-date stripped binary. Generating a ' |
- 'new one (%s).' % target_name) |
- # Whenever we generate a stripped binary, copy to the symbols dir. If we |
- # aren't stripping a new binary, assume it's there. |
- if not os.path.exists(self._symbols_dir): |
- os.makedirs(self._symbols_dir) |
- shutil.copy(self.suite_path, self._symbols_dir) |
- strip = os.environ['STRIP'] |
- cmd_helper.RunCmd([strip, self.suite_path, '-o', target_name]) |
+ target_name = self.suite_path + '_stripped' |
+ if not os.path.isfile(target_name): |
+ logging.critical('Did not find %s, build target %s', |
+ target_name, self.suite_name + '_stripped') |
+ sys.exit(1) |
+ |
+ target_mtime = os.stat(target_name).st_mtime |
+ source_mtime = os.stat(self.suite_path).st_mtime |
+ if target_mtime < source_mtime: |
+ logging.critical( |
+ 'stripped binary (%s, timestamp %d) older than ' |
+ 'source binary (%s, timestamp %d), build target %s', |
+ target_name, target_mtime, self.suite_path, source_mtime, |
+ self.suite_name + '_stripped') |
+ sys.exit(1) |
+ |
test_binary = constants.TEST_EXECUTABLE_DIR + '/' + self.suite_name |
adb.PushIfNeeded(target_name, test_binary) |