Correctly test failures while building boards.

TEST=None
BUG=None

Change-Id: Iaae09d30214d6f8bb8b069d5fc4009a20cb0e6d8
Reviewed-on: https://chrome-internal-review.googlesource.com/162912
Reviewed-by: Yunlian Jiang <yunlian@google.com>
Commit-Queue: Han Shen <shenhan@google.com>
Tested-by: Han Shen <shenhan@google.com>
diff --git a/build_tool.py b/build_tool.py
index e81b77c..81a2b3a 100755
--- a/build_tool.py
+++ b/build_tool.py
@@ -428,7 +428,7 @@
         self._logger.LogOutput(
             'Successfully built "{0}" for board "{1}".'.format(tool_name, board))
 
-    if not failed:
+    if failed:
       self._logger.LogError(
           'Failed to build {0} for the following board(s): "{1}"'.format(
               tool_name, ' '.join(failed)))