| Index: build/android/generate_emma_html.py
 | 
| diff --git a/build/android/generate_emma_html.py b/build/android/generate_emma_html.py
 | 
| index 64d834f3383a86dd1109755baaaada3727242532..9d1d7330b3600ef74e7e9e72a995db5497b2b9b2 100755
 | 
| --- a/build/android/generate_emma_html.py
 | 
| +++ b/build/android/generate_emma_html.py
 | 
| @@ -58,6 +58,9 @@ def main():
 | 
|  
 | 
|    coverage_files = _GetFilesWithExt(options.coverage_dir, 'ec')
 | 
|    metadata_files = _GetFilesWithExt(options.metadata_dir, 'em')
 | 
| +  # Filter out zero-length files. These are created by emma_instr.py when a
 | 
| +  # target has no classes matching the coverage filter.
 | 
| +  metadata_files = [f for f in metadata_files if os.path.getsize(f)]
 | 
|    print 'Found coverage files: %s' % str(coverage_files)
 | 
|    print 'Found metadata files: %s' % str(metadata_files)
 | 
|  
 | 
| @@ -87,6 +90,10 @@ def main():
 | 
|      for f in coverage_files:
 | 
|        os.remove(f)
 | 
|  
 | 
| +  # Command tends to exit with status 0 when it actually failed.
 | 
| +  if not exit_code and not os.path.exists(options.output):
 | 
| +    exit_code = 1
 | 
| +
 | 
|    return exit_code
 | 
|  
 | 
|  
 | 
| 
 |