Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

bug 698804 - sign_android.py will now fatal() on a failed download. r…

…=nthomas
  • Loading branch information...
commit a0d79052cf74d912f56572fef8eee6f4260f569c 1 parent 5d4cca0
Aki Sasaki authored January 08, 2013
10  mozharness/base/script.py
@@ -833,10 +833,12 @@ def query_failure(self, key):
833 833
         return key in self.failures
834 834
 
835 835
     def summarize_success_count(self, success_count, total_count,
836  
-                                message="%d of %d successful."):
837  
-        level = INFO
838  
-        if success_count < total_count:
839  
-            level = ERROR
  836
+                                message="%d of %d successful.",
  837
+                                level=None):
  838
+        if level is None:
  839
+            level = INFO
  840
+            if success_count < total_count:
  841
+                level = ERROR
840 842
         self.add_summary(message % (success_count, total_count),
841 843
                          level=level)
842 844
 
9  scripts/sign_android.py
@@ -18,7 +18,7 @@
18 18
 # load modules from parent dir
19 19
 sys.path.insert(1, os.path.dirname(sys.path[0]))
20 20
 
21  
-from mozharness.base.log import ERROR, FATAL
  21
+from mozharness.base.log import INFO, ERROR, FATAL
22 22
 from mozharness.base.transfer import TransferMixin
23 23
 from mozharness.mozilla.release import ReleaseMixin
24 24
 from mozharness.mozilla.signing import MobileSigningMixin
@@ -210,8 +210,13 @@ def download_unsigned_bits(self):
210 210
                                      message="Unable to download %(platform)s:%(locale)s unsigned apk!")
211 211
                 else:
212 212
                     success_count += 1
  213
+        level = INFO
  214
+        # fatal() if we fail to download (bug 827226)
  215
+        if success_count < total_count:
  216
+            level = FATAL
213 217
         self.summarize_success_count(success_count, total_count,
214  
-                                     message="Downloaded %d of %d unsigned apks successfully.")
  218
+                                     message="Downloaded %d of %d unsigned apks successfully.",
  219
+                                     level=level)
215 220
         if c['enable_partner_repacks']:
216 221
             self.info("Downloading partner-repacks")
217 222
             if replace_dict.get('platform'):

0 notes on commit a0d7905

Please sign in to comment.
Something went wrong with that request. Please try again.