Index: components/cronet/tools/generate_javadoc.py |
diff --git a/components/cronet/tools/generate_javadoc.py b/components/cronet/tools/generate_javadoc.py |
index 3914b91ed235643cbecda7911d1e3ebce6bdf5d6..7a4b98925861e94208a2e7817a0ebf48da1031be 100755 |
--- a/components/cronet/tools/generate_javadoc.py |
+++ b/components/cronet/tools/generate_javadoc.py |
@@ -43,9 +43,15 @@ def GenerateJavadoc(options, src_dir): |
'-Dlib.java.dir=' + lib_java_dir, '-Doverview=' + overview_file, |
'doc'] |
stdout = build_utils.CheckOutput(javadoc_cmd, cwd=working_dir) |
- if " error: " in stdout or "warning" in stdout or "javadoc: error " in stdout: |
- build_utils.DeleteDirectory(output_dir) |
- raise build_utils.CalledProcessError(working_dir, javadoc_cmd, stdout) |
+ for line in stdout.splitlines(): |
ghost stip (do not use)
2016/10/20 20:52:04
xunjieli: wdyt? I tested it and it definitely rais
xunjieli
2016/10/20 20:58:54
Seems good to me :)
|
+ if " error: " in line or "javadoc: error " in line: |
+ build_utils.DeleteDirectory(output_dir) |
+ raise build_utils.CalledProcessError(working_dir, javadoc_cmd, stdout) |
+ # TODO(crbug.com/655666): remove compiler suppression warning once fixed. |
+ if ("warning" in line and not line.endswith('warnings') and |
ghost stip (do not use)
2016/10/20 20:52:04
the endswith is because at the end it displays "66
xunjieli
2016/10/20 20:58:55
Acknowledged.
|
+ not "the highest major version" in line): |
+ build_utils.DeleteDirectory(output_dir) |
ghost stip (do not use)
2016/10/20 20:52:04
I felt the if statement was complicated enough tha
xunjieli
2016/10/20 20:58:54
Acknowledged.
|
+ raise build_utils.CalledProcessError(working_dir, javadoc_cmd, stdout) |
def main(): |