Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2201)

Unified Diff: build/android/pylib/gtest/test_package_exe.py

Issue 154153008: Use exception instead of sys.exit(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 69a7b07524c032b63ee4c5be0adcdd9c1b08002b..2fc1005d5b11e04cadcf31b1c6bd52d0f5485ee2 100644
--- a/build/android/pylib/gtest/test_package_exe.py
+++ b/build/android/pylib/gtest/test_package_exe.py
@@ -123,19 +123,17 @@ class TestPackageExecutable(TestPackage):
else:
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)
+ raise Exception('Did not find %s, build target %s' %
+ (target_name, self.suite_name + '_stripped'))
target_mtime = os.stat(target_name).st_mtime
source_mtime = os.stat(self.suite_path).st_mtime
if target_mtime < source_mtime:
- logging.critical(
+ raise Exception(
'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)
+ 'source binary (%s, timestamp %d), build target %s' %
+ (target_name, target_mtime, self.suite_path, source_mtime,
+ self.suite_name + '_stripped'))
test_binary = constants.TEST_EXECUTABLE_DIR + '/' + self.suite_name
adb.PushIfNeeded(target_name, test_binary)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698