author | Mike Sullivan <Mike.Sullivan@Oracle.COM> |
Tue, 13 Jan 2015 09:09:22 -0800 | |
changeset 3628 | d165e4d5af9a |
parent 2150 | 1acc968ac0d9 |
child 3770 | ca450a806cc1 |
permissions | -rwxr-xr-x |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
1 |
#!/usr/bin/python |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
2 |
# |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
3 |
# CDDL HEADER START |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
4 |
# |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
5 |
# The contents of this file are subject to the terms of the |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
6 |
# Common Development and Distribution License (the "License"). |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
7 |
# You may not use this file except in compliance with the License. |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
8 |
# |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
9 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
10 |
# or http://www.opensolaris.org/os/licensing. |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
11 |
# See the License for the specific language governing permissions |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
12 |
# and limitations under the License. |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
13 |
# |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
14 |
# When distributing Covered Code, include this CDDL HEADER in each |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
15 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
16 |
# If applicable, add the following below this CDDL HEADER, with the |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
17 |
# fields enclosed by brackets "[]" replaced with your own identifying |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
18 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
19 |
# |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
20 |
# CDDL HEADER END |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
21 |
# |
2140
ba3091d7e9b6
19775104 Multiple TPNO's not being correctly displayed on Userland gatelist webpage
Rich Burridge <rich.burridge@oracle.com>
parents:
1205
diff
changeset
|
22 |
# Copyright (c) 2012, 2014, Oracle and/or it's affiliates. All rights reserved. |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
23 |
# |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
24 |
# |
1061
757624619bb3
15922912 Auto-generation of Userland gate list - Phase 4
Rich Burridge <rich.burridge@oracle.com>
parents:
1058
diff
changeset
|
25 |
# gen_components |
2140
ba3091d7e9b6
19775104 Multiple TPNO's not being correctly displayed on Userland gatelist webpage
Rich Burridge <rich.burridge@oracle.com>
parents:
1205
diff
changeset
|
26 |
# A simple script to generate (on stdout), the component.html web page |
ba3091d7e9b6
19775104 Multiple TPNO's not being correctly displayed on Userland gatelist webpage
Rich Burridge <rich.burridge@oracle.com>
parents:
1205
diff
changeset
|
27 |
# found at: http://userland.us.oracle.com/component-lists/s12.html |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
28 |
# |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
29 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
30 |
import getopt |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
31 |
import os |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
32 |
import sys |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
33 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
34 |
debug = False |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
35 |
|
1063
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
36 |
# Hashtable of RE's, RM's and Teams keyed by component path. |
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
37 |
owners = {} |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
38 |
|
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
39 |
# Initial HTML for the generated web page. |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
40 |
preamble = """ |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
41 |
<html> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
42 |
<head> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
43 |
<style type='text/css' media='screen'> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
44 |
@import '/css/demo_table.css'; |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
45 |
@import '/css/ColVis.css'; |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
46 |
@import '/css/ColReorder.css'; |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
47 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
48 |
tr.even:hover, tr.even:hover td.sorting_1 , |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
49 |
tr.odd:hover, tr.odd:hover td.sorting_1 { |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
50 |
background-color: gold; |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
51 |
} |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
52 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
53 |
</style> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
54 |
<script type='text/javascript' src='js/jquery.js'></script> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
55 |
<script type='text/javascript' src='js/jquery.dataTables.js'></script> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
56 |
<script type='text/javascript' src='js/ColReorder.js'></script> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
57 |
<script type='text/javascript' src='js/ColVis.js'></script> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
58 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
59 |
<script> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
60 |
$(document).ready(function() { |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
61 |
$('#components').dataTable({ |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
62 |
"sDom": 'C<"clear">Rlfrtip', |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
63 |
bPaginate: true, |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
64 |
bFilter: true, |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
65 |
bSort: true, |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
66 |
iDisplayLength: -1, |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
67 |
aLengthMenu: [ [ 10, 50, -1], [ 10, 50, 'All'] ] |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
68 |
}); |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
69 |
}); |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
70 |
</script> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
71 |
</head> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
72 |
<body> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
73 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
74 |
<h1>Userland Components</h1> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
75 |
<p> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
76 |
<table align='center' id='components'> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
77 |
<thead> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
78 |
<tr> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
79 |
<th>Component</th> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
80 |
<th>Version</th> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
81 |
<th>Gate Path</th> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
82 |
<th>Package(s)</th> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
83 |
<th>ARC Case(s)</th> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
84 |
<th>License(s)</th> |
1061
757624619bb3
15922912 Auto-generation of Userland gate list - Phase 4
Rich Burridge <rich.burridge@oracle.com>
parents:
1058
diff
changeset
|
85 |
<th>TPNO</th> |
1058
34d7aaa03423
15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents:
1053
diff
changeset
|
86 |
<th>BugDB</th> |
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
87 |
<th>RE</th> |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
88 |
<th>RM</th> |
1063
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
89 |
<th>Team</th> |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
90 |
</tr> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
91 |
</thead> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
92 |
<tbody> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
93 |
""" |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
94 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
95 |
# Final HTML for the generated web page. |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
96 |
postamble = """ |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
97 |
</tr> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
98 |
</tbody> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
99 |
</table> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
100 |
</body> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
101 |
</html> |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
102 |
""" |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
103 |
|
1063
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
104 |
# Return a hashtable of RE's, RM's and Teams keyed by component path. |
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
105 |
def read_owners(owners_file): |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
106 |
if debug: |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
107 |
print >> sys.stderr, "Reading %s" % owners_file |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
108 |
try: |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
109 |
fin = open(owners_file, 'r') |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
110 |
lines = fin.readlines() |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
111 |
fin.close() |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
112 |
except: |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
113 |
if debug: |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
114 |
print >> sys.stderr, "Unable to read owners file: %s" % owners_file |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
115 |
|
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
116 |
owners = {} |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
117 |
for line in lines: |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
118 |
line = line[:-1] |
1063
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
119 |
component, re, rm, team = line.split("|") |
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
120 |
owners[component] = [ re, rm, team ] |
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
121 |
|
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
122 |
return owners |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
123 |
|
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
124 |
# Return a sorted list of the directories containing one or more .p5m files. |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
125 |
def find_p5m_dirs(workspace): |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
126 |
p5m_dirs = [] |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
127 |
for dir, _, files in os.walk(workspace + "/components"): |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
128 |
for file in files: |
2150
1acc968ac0d9
19807306 Userland gatelist shouldn't show entry for the "Package History" component
Rich Burridge <rich.burridge@oracle.com>
parents:
2140
diff
changeset
|
129 |
if dir.endswith("meta-packages/history"): |
1acc968ac0d9
19807306 Userland gatelist shouldn't show entry for the "Package History" component
Rich Burridge <rich.burridge@oracle.com>
parents:
2140
diff
changeset
|
130 |
continue; |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
131 |
if file.endswith(".p5m"): |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
132 |
p5m_dirs.append(dir) |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
133 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
134 |
return sorted(list(set(p5m_dirs))) |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
135 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
136 |
# Write out the initial HTML for the components.html web page. |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
137 |
def write_preamble(): |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
138 |
print preamble |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
139 |
|
1063
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
140 |
# Return the RE, RM and Team for this component. |
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
141 |
def get_owner(p5m_dir): |
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
142 |
result = [ "Unknown", "Unknown", "Unknown" ] |
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
143 |
component_path = "" |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
144 |
started = False |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
145 |
tokens = p5m_dir.split("/") |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
146 |
for token in tokens: |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
147 |
if started: |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
148 |
component_path += token + "/" |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
149 |
if token == "components": |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
150 |
started = True |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
151 |
component_path = component_path[:-1] |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
152 |
if component_path in owners: |
1063
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
153 |
result = owners[component_path] |
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
154 |
if debug: |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
155 |
print >> sys.stderr, "Component path: ", component_path, |
1063
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
156 |
print >> sys.stderr, "RE, RM, Team: ", result |
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
157 |
|
1063
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
158 |
return result |
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
159 |
|
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
160 |
# Generate an HTML table entry for all the information for the component |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
161 |
# in the given directory. This generates a file called 'component-report' |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
162 |
# under the components build directory. |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
163 |
def gen_reports(workspace, component_dir): |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
164 |
if debug: |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
165 |
print >> sys.stderr, "Processing %s" % component_dir |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
166 |
|
1063
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
167 |
re, rm, team = get_owner(component_dir) |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
168 |
makefiles = "-f Makefile -f %s/make-rules/component-report" % workspace |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
169 |
targets = "clean component-hook" |
1063
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
170 |
template = "cd %s; " |
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
171 |
template += "RESPONSIBLE_ENGINEER='%s' " |
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
172 |
template += "RESPONSIBLE_MANAGER='%s' " |
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
173 |
template += "TEAM='%s' " |
ce6e2ed3767e
15924689 Auto-generation of Userland gate list - Phase 5
Rich Burridge <rich.burridge@oracle.com>
parents:
1061
diff
changeset
|
174 |
template += "gmake COMPONENT_HOOK='gmake %s component-report' %s" |
2140
ba3091d7e9b6
19775104 Multiple TPNO's not being correctly displayed on Userland gatelist webpage
Rich Burridge <rich.burridge@oracle.com>
parents:
1205
diff
changeset
|
175 |
cmd = template % (component_dir, re, rm, team, makefiles, targets) |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
176 |
|
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
177 |
if debug: |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
178 |
print >> sys.stderr, "gen_reports: command: `%s`" % cmd |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
179 |
lines = os.popen(cmd).readlines() |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
180 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
181 |
# Collect all the .../build/component-report files and write them to stdout. |
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
182 |
def write_reports(p5m_dirs, owners_file): |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
183 |
for p5m_dir in p5m_dirs: |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
184 |
report = "%s/build/component-report" % p5m_dir |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
185 |
if debug: |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
186 |
print >> sys.stderr, "Reading %s" % report |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
187 |
try: |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
188 |
fin = open(report, 'r') |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
189 |
lines = fin.readlines() |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
190 |
fin.close() |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
191 |
sys.stdout.writelines(lines) |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
192 |
except: |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
193 |
if debug: |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
194 |
print >> sys.stderr, "Unable to read: %s" % report |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
195 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
196 |
# Write out the final HTML for the components.html web page. |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
197 |
def write_postamble(): |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
198 |
print postamble |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
199 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
200 |
# Write out a usage message showing valid options to this script. |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
201 |
def usage(): |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
202 |
print >> sys.stderr, \ |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
203 |
""" |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
204 |
Usage: |
1139
2fe2a52488cb
16245054 Auto-generation of Userland gate list - Phase 6
Rich Burridge <rich.burridge@oracle.com>
parents:
1063
diff
changeset
|
205 |
gen-components [OPTION...] |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
206 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
207 |
-d, --debug |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
208 |
Turn on debugging |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
209 |
|
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
210 |
-o, --owners |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
211 |
Location of a file containing a list of RE's /RM's per component |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
212 |
|
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
213 |
-w --workspace |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
214 |
Location of the Userland workspace |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
215 |
""" |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
216 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
217 |
sys.exit(1) |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
218 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
219 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
220 |
if __name__ == "__main__": |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
221 |
workspace = os.getenv('WS_TOP') |
1139
2fe2a52488cb
16245054 Auto-generation of Userland gate list - Phase 6
Rich Burridge <rich.burridge@oracle.com>
parents:
1063
diff
changeset
|
222 |
owners_file = "/net/userland.us.oracle.com/gates/private/RE-RM-list.txt" |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
223 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
224 |
try: |
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
225 |
opts, args = getopt.getopt(sys.argv[1:], "do:w:", |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
226 |
[ "debug", "owners=", "workspace=" ]) |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
227 |
except getopt.GetoptError, err: |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
228 |
print str(err) |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
229 |
usage() |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
230 |
|
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
231 |
for opt, arg in opts: |
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
232 |
if opt in [ "-d", "--debug" ]: |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
233 |
debug = True |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
234 |
elif opt in [ "-o", "--owners" ]: |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
235 |
owners_file = arg |
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
236 |
elif opt in [ "-w", "--workspace" ]: |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
237 |
workspace = arg |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
238 |
else: |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
239 |
assert False, "unknown option" |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
240 |
|
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
241 |
owners = read_owners(owners_file) |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
242 |
write_preamble() |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
243 |
p5m_dirs = find_p5m_dirs(workspace) |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
244 |
for p5m_dir in p5m_dirs: |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
245 |
gen_reports(workspace, p5m_dir) |
1053
accc15fa8762
15878378 Auto-generation of Userland gate list - Phase 2
Rich Burridge <rich.burridge@oracle.com>
parents:
1048
diff
changeset
|
246 |
write_reports(p5m_dirs, owners_file) |
1048
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
247 |
write_postamble() |
e82fa02a4d16
15863968 Auto-generation of Userland gate list - Phase 1.
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
248 |
sys.exit(0) |