Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: tools/code_coverage/process_coverage.py

Issue 1561020: Hierarchy. Hierarchy. Hierarchy!!! (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « o3d/tests/selenium/tests/pixel-perfection.html ('k') | tools/xcodebodge/xcodebodge.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python2.4 1 #!/usr/bin/python2.4
2 # 2 #
3 # Copyright 2008, Google Inc. 3 # Copyright 2008, Google Inc.
4 # All rights reserved. 4 # All rights reserved.
5 # 5 #
6 # Redistribution and use in source and binary forms, with or without 6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are 7 # modification, are permitted provided that the following conditions are
8 # met: 8 # met:
9 # 9 #
10 # * Redistributions of source code must retain the above copyright 10 # * Redistributions of source code must retain the above copyright
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 Returns: 99 Returns:
100 Code coverage percentage on sucess. 100 Code coverage percentage on sucess.
101 None on failure. 101 None on failure.
102 """ 102 """
103 # Parse the LCOV file name. 103 # Parse the LCOV file name.
104 filename = os.path.basename(lcov_path).split('.')[0] 104 filename = os.path.basename(lcov_path).split('.')[0]
105 buffer = filename.split('_') 105 buffer = filename.split('_')
106 dash_root = dash_root.rstrip('/') # Remove trailing '/' 106 dash_root = dash_root.rstrip('/') # Remove trailing '/'
107 107
108 # Set up correct folder heirarchy in the dashboard root 108 # Set up correct folder hierarchy in the dashboard root
109 # TODO(niranjan): Check the formatting using a regexp 109 # TODO(niranjan): Check the formatting using a regexp
110 if len(buffer) >= 3: # Check if filename has right formatting 110 if len(buffer) >= 3: # Check if filename has right formatting
111 platform = buffer[len(buffer) - 2] 111 platform = buffer[len(buffer) - 2]
112 revision = buffer[len(buffer) - 1] 112 revision = buffer[len(buffer) - 1]
113 if os.path.exists(os.path.join(dash_root, platform)) == False: 113 if os.path.exists(os.path.join(dash_root, platform)) == False:
114 os.mkdir(os.path.join(dash_root, platform)) 114 os.mkdir(os.path.join(dash_root, platform))
115 output_dir = os.path.join(dash_root, platform, revision) 115 output_dir = os.path.join(dash_root, platform, revision)
116 os.mkdir(output_dir) 116 os.mkdir(output_dir)
117 else: 117 else:
118 # TODO(niranjan): Add failure logging here. 118 # TODO(niranjan): Add failure logging here.
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 print 'Unsupported platform' 429 print 'Unsupported platform'
430 os.exit(1) 430 os.exit(1)
431 431
432 # Prep coverage results for dashboard and post new set. 432 # Prep coverage results for dashboard and post new set.
433 parsed_data = ParseCoverageDataForDashboard(options.lcov_path) 433 parsed_data = ParseCoverageDataForDashboard(options.lcov_path)
434 PostResultsToDashboard(options.lcov_path, parsed_data, options.post_url) 434 PostResultsToDashboard(options.lcov_path, parsed_data, options.post_url)
435 435
436 436
437 if __name__ == '__main__': 437 if __name__ == '__main__':
438 main() 438 main()
OLDNEW
« no previous file with comments | « o3d/tests/selenium/tests/pixel-perfection.html ('k') | tools/xcodebodge/xcodebodge.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698