Merge remote branch 'cros/upstream' into master

Merged to upstream autotest @4749~@5215.

The entire change list description is too big to enlist here. Please refer to upstream (http://autotest.kernel.org/browser) for more details.

BUG=
TEST=emerged both x86 and arm build.
Tested emerged x86 build bvt against a chromeos device.

Review URL: http://codereview.chromium.org/6246035

Change-Id: I8455f2135c87c321c6efc232e2869dc8f675395e
diff --git a/client/tests/unixbench/unixbench.py b/client/tests/unixbench/unixbench.py
index b3fe920..9983cec 100644
--- a/client/tests/unixbench/unixbench.py
+++ b/client/tests/unixbench/unixbench.py
@@ -19,7 +19,7 @@
 
         utils.system('patch -p1 < ../unixbench.patch')
         utils.system('patch -p1 < ../Makefile.patch')
-        utils.system('make')
+        utils.make()
         utils.system('rm pgms/select')
 
 
@@ -34,7 +34,15 @@
                     % ((stepsecs,)*5)
 
         os.chdir(self.srcdir)
-        utils.system(vars + ' ./Run ' + args)
+        try:
+            utils.system(vars + ' ./Run ' + args)
+        finally:
+            times_path = os.path.join(self.resultsdir, 'times')
+            # The 'times' file can be needlessly huge as it contains warnings
+            # and error messages printed out by small benchmarks that are
+            # run in a loop.  It can easily compress 100x in such cases.
+            if os.path.exists(times_path):
+                utils.system("gzip -9 '%s'" % (times_path,), ignore_status=True)
 
         report_path = os.path.join(self.resultsdir, 'report')
         self.report_data = open(report_path).readlines()[9:]