OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 # | |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | |
4 # Use of this source code is governed by a BSD-style license that can be | |
5 # found in the LICENSE file. | |
6 """An Ant wrapper that suppresses useless Ant output | |
7 | |
8 Ant build scripts output "BUILD SUCCESSFUL" and build timing at the end of | |
9 every build. In the Android build, this just adds a lot of useless noise to the | |
10 build output. This script forwards its arguments to ant, and prints Ant's | |
11 output up until the BUILD SUCCESSFUL line. | |
12 """ | |
13 | |
14 import sys | |
15 | |
16 from util import build_utils | |
17 | |
18 | |
19 def main(argv): | |
20 stdout = build_utils.CheckCallDie(['ant'] + argv[1:], suppress_output=True) | |
21 stdout = stdout.strip().split('\n') | |
22 for line in stdout: | |
23 if 'BUILD SUCCESSFUL' in line: | |
newt (away)
2013/04/04 01:41:43
Can this be stricter?
line == 'BUILD_SUCCESSFUL'
cjhopman
2013/04/04 16:38:31
Done.
| |
24 break | |
25 print line | |
26 | |
27 | |
28 if __name__ == '__main__': | |
29 sys.exit(main(sys.argv)) | |
30 | |
OLD | NEW |