Bug 936594 - DoCommand.InstallApp - Treat non-zero exit codes for pm install as failures, r=jmaher.
authorBob Clary <bclary@bclary.com>
Mon, 02 Dec 2013 22:11:29 -0800
changeset 174179 2eea9b6ba1d77a41f4a5d3e9bcce4cb55e8731dc
parent 174178 8d562b33673102fe9cc785b61a5055911ad110ec
child 174180 94f5ee227f40a7bd599c42092f57f244f2bbcf3d
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs936594
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 936594 - DoCommand.InstallApp - Treat non-zero exit codes for pm install as failures, r=jmaher.
build/mobile/sutagent/android/DoCommand.java
--- a/build/mobile/sutagent/android/DoCommand.java
+++ b/build/mobile/sutagent/android/DoCommand.java
@@ -3455,21 +3455,26 @@ private void CancelNotification()
                 sPmCmd = "pm install -r " + sApp + " Cleanup;exit";
             }
             pProc = Runtime.getRuntime().exec(this.getSuArgs(sPmCmd));
             RedirOutputThread outThrd3 = new RedirOutputThread(pProc, out);
             outThrd3.start();
             try {
                 outThrd3.joinAndStopRedirect(60000);
                 int nRet3 = pProc.exitValue();
-                sRet = "\ninstallation complete [" + nRet3 + "]";
+                if (nRet3 == 0) {
+                    sRet = "\ninstallation complete [0]\n";
+                }
+                else {
+                    sRet = "\nFailure pm install [" + nRet3 + "]\n";
+                }
                 }
             catch (IllegalThreadStateException itse) {
                 itse.printStackTrace();
-                sRet = "\npm install command timed out";
+                sRet = "\nFailure pm install command timed out\n";
             }
             try {
                 out.write(sRet.getBytes());
                 out.flush();
                 }
             catch (IOException e1)
                 {
                 e1.printStackTrace();