Silenced collecting dmesg output to just be saved in the dedicated file 
instead of also having it on stdout.

Signed-off-by: Mihai Rusu <dizzy@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2634 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/hosts/remote.py b/server/hosts/remote.py
index 2c72321..5dfbff4 100644
--- a/server/hosts/remote.py
+++ b/server/hosts/remote.py
@@ -218,12 +218,16 @@
                 print "crashinfo collection of %s failed with:\n%s" % (log, e)
 
         # collect dmesg
-        print "Collecting dmesg..."
+        print "Collecting dmesg (saved to crashinfo/dmesg)..."
+        devnull = open("/dev/null", "w")
         try:
-            result = self.run("dmesg").stdout
-            file(os.path.join(infodir, "dmesg"), "w").write(result)
-        except Exception, e:
-            print "crashinfo collection of dmesg failed with:\n%s" % e
+            try:
+                result = self.run("dmesg", stdout_tee=devnull).stdout
+                file(os.path.join(infodir, "dmesg"), "w").write(result)
+            except Exception, e:
+                print "crashinfo collection of dmesg failed with:\n%s" % e
+        finally:
+            devnull.close()
 
 
     def are_wait_up_processes_up(self):