• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

firstparty/14-Jan-2024-203191

notice/14-Jan-2024-203191

proprietary/14-Jan-2024-201189

reciprocal/14-Jan-2024-202190

regressconcur/14-Jan-2024-371347

regressgpl1/14-Jan-2024-162151

regressgpl2/14-Jan-2024-177166

restricted/14-Jan-2024-210197

README.mdD14-Jan-202410.4 KiB327296

README.md

1## Test data
2
3Each non-regression directory under testdata/ defines a similar build graph.
4All have the same structure, but different versions of the graph have different
5license metadata.
6
7The regression* directories can have whatever structure is required for the
8specific test case.
9
10### Testdata build graph structure:
11
12The structure is meant to simulate some common scenarios:
13
14*   a `lib/` directory with some libraries
15*   a `bin/` directory with some executables
16*   one of the binaries, `bin3`, is a toolchain executable like a compiler
17*   an `application` built with the `bin3` compiler and linking a couple libraries
18*   a pure aggregation `continer.zip` that merely bundles files together, and
19*   an apex file (more like an apk file) with some binaries and libraries.
20
21The testdata starts with a `firstparty/` version containng only first-party
22licenses, and each subsequent directory introduces more restrictive conditions:
23
24*   `notice/` starts with `firstparty/` adds third-party notice conditions
25*   `reciprocal/` starts with `notice/` and adds some reciprocal conditions
26*   `restricted/` starts with `reciprocal/` and adds some restricted conditions
27*   `proprietary/` starts with `restricted/` and add some privacy conditions
28
29#### a `lib/` directory with some libraries
30
31```dot
32strict digraph {
33	liba [label="lib/liba.so.meta_lic"];
34	libb [label="lib/libb.so.meta_lic"];
35	libc [label="lib/libc.a.meta_lic"];
36	libd [label="lib/libd.so.meta_lic"];
37}
38```
39
40#### a `bin/` directory with some executables
41
42strict digraph {
43	rankdir=LR;
44	bin1 [label="bin/bin1.meta_lic"];
45	bin2 [label="bin/bin2.meta_lic"];
46	bin3 [label="bin/bin3.meta_lic\ntoolchain"];
47	liba [label="lib/liba.so.meta_lic"];
48	libb [label="lib/libb.so.meta_lic"];
49	libc [label="lib/libc.a.meta_lic"];
50	libd [label="lib/libd.so.meta_lic"];
51	bin1 -> liba [label="static"];
52	bin1 -> libc [label="static"];
53	bin2 -> libb [label="dynamic"];
54	bin2 -> libd [label="dynamic"];
55	{rank=same; bin1 bin2 bin3}
56}
57
58#### an `application` built with the `bin3` compiler and linking a couple libraries
59
60```dot
61strict digraph {
62	rankdir=LR;
63	app [label="application.meta_lic"];
64	bin3 [label="bin/bin3.meta_lic"];
65	liba [label="lib/liba.so.meta_lic"];
66	libb [label="lib/libb.so.meta_lic"];
67	app -> bin3 [label="toolchain"];
68	app -> liba [label="static"];
69	app -> libb [label="dynamic"];
70	{rank=same; app}
71}
72```
73
74#### a pure aggregation `container.zip` that merely bundles files together
75
76```dot
77strict digraph {
78	rankdir=LR;
79	bin1 [label="bin/bin1.meta_lic"];
80	bin2 [label="bin/bin2.meta_lic"];
81	container [label="container.zip.meta_lic"];
82	liba [label="lib/liba.so.meta_lic"];
83	libb [label="lib/libb.so.meta_lic"];
84	libc [label="lib/libc.a.meta_lic"];
85	libd [label="lib/libd.so.meta_lic"];
86	bin1 -> liba [label="static"];
87	bin1 -> libc [label="static"];
88	bin2 -> libb [label="dynamic"];
89	bin2 -> libd [label="dynamic"];
90	container -> bin1 [label="static"];
91	container -> bin2 [label="static"];
92	container -> liba [label="static"];
93	container -> libb [label="static"];
94	{rank=same; container}
95}
96```
97
98#### an apex file (more like an apk file) with some binaries and libraries
99
100```dot
101strict digraph {
102	rankdir=LR;
103	apex [label="highest.apex.meta_lic"];
104	bin1 [label="bin/bin1.meta_lic"];
105	bin2 [label="bin/bin2.meta_lic"];
106	bin3 [label="bin/bin3.meta_lic"];
107	liba [label="lib/liba.so.meta_lic"];
108	libb [label="lib/libb.so.meta_lic"];
109	libc [label="lib/libc.a.meta_lic"];
110	libd [label="lib/libd.so.meta_lic"];
111	bin1 -> liba [label="static"];
112	bin1 -> libc [label="static"];
113	bin2 -> libb [label="dynamic"];
114	bin2 -> libd [label="dynamic"];
115	apex -> bin1 [label="static"];
116	apex -> bin2 [label="static"];
117	apex -> liba [label="static"];
118	apex -> libb [label="static"];
119	{rank=same; apex}
120}
121```
122
123#### the whole build graph
124
125```dot
126strict digraph {
127	rankdir=LR;
128	apex [label="highest.apex.meta_lic"];
129	app [label="application.meta_lic"];
130	bin1 [label="bin/bin1.meta_lic"];
131	bin2 [label="bin/bin2.meta_lic"];
132	bin3 [label="bin/bin3.meta_lic"];
133	container [label="container.zip.meta_lic"];
134	liba [label="lib/liba.so.meta_lic"];
135	libb [label="lib/libb.so.meta_lic"];
136	libc [label="lib/libc.a.meta_lic"];
137	libd [label="lib/libd.so.meta_lic"];
138	app -> bin3 [label="toolchain"];
139	app -> liba [label="static"];
140	app -> libb [label="dynamic"];
141	bin1 -> liba [label="static"];
142	bin1 -> libc [label="static"];
143	bin2 -> libb [label="dynamic"];
144	bin2 -> libd [label="dynamic"];
145	container -> bin1 [label="static"];
146	container -> bin2 [label="static"];
147	container -> liba [label="static"];
148	container -> libb [label="static"];
149	apex -> bin1 [label="static"];
150	apex -> bin2 [label="static"];
151	apex -> liba [label="static"];
152	apex -> libb [label="static"];
153	{rank=same; app container apex}
154}
155```
156
157
158### firstparty/ testdata starts with all first-party licensing
159
160```dot
161strict digraph {
162	rankdir=LR;
163	app [label="firstparty/application.meta_lic"];
164	bin1 [label="firstparty/bin/bin1.meta_lic"];
165	bin2 [label="firstparty/bin/bin2.meta_lic"];
166	bin3 [label="firstparty/bin/bin3.meta_lic"];
167	container [label="firstparty/container.zip.meta_lic"];
168	apex [label="firstparty/highest.apex.meta_lic"];
169	liba [label="firstparty/lib/liba.so.meta_lic"];
170	libb [label="firstparty/lib/libb.so.meta_lic"];
171	libc [label="firstparty/lib/libc.a.meta_lic"];
172	lib [label="firstparty/lib/libd.so.meta_lic"];
173	app -> bin3 [label="toolchain"];
174	app -> liba [label="static"];
175	app -> libb [label="dynamic"];
176	bin1 -> liba [label="static"];
177	bin1 -> libc [label="static"];
178	bin2 -> libb [label="dynamic"];
179	bin2 -> libd [label="dynamic"];
180	container -> bin1 [label="static"];
181	container -> bin2 [label="static"];
182	container -> liba [label="static"];
183	container -> libb [label="static"];
184	apex -> bin1 [label="static"];
185	apex -> bin2 [label="static"];
186	apex -> liba [label="static"];
187	apex -> libb [label="static"];
188	{rank=same; app container apex}
189}
190```
191
192### notice/ testdata introduces third-party notice conditions
193
194```dot
195strict digraph {
196	rankdir=LR;
197	app [label="notice/application.meta_lic"];
198	bin1 [label="notice/bin/bin1.meta_lic"];
199	bin2 [label="notice/bin/bin2.meta_lic"];
200	bin3 [label="notice/bin/bin3.meta_lic\nnotice"];
201	container [label="notice/container.zip.meta_lic"];
202	apex [label="notice/highest.apex.meta_lic"];
203	liba [label="notice/lib/liba.so.meta_lic\nnotice"];
204	libb [label="notice/lib/libb.so.meta_lic"];
205	libc [label="notice/lib/libc.a.meta_lic\nnotice"];
206	libd [label="notice/lib/libd.so.meta_lic\nnotice"];
207	app -> bin3 [label="toolchain"];
208	app -> liba [label="static"];
209	app -> libb [label="dynamic"];
210	bin1 -> liba [label="static"];
211	bin1 -> libc [label="static"];
212	bin2 -> libb [label="dynamic"];
213	bin2 -> libd [label="dynamic"];
214	container -> bin1 [label="static"];
215	container -> bin2 [label="static"];
216	container -> liba [label="static"];
217	container -> libb [label="static"];
218	apex -> bin1 [label="static"];
219	apex -> bin2 [label="static"];
220	apex -> liba [label="static"];
221	apex -> libb [label="static"];
222	{rank=same; app container apex}
223}
224```
225
226### reciprocal/ testdata introduces third-party reciprocal sharing conditions
227
228```dot
229strict digraph {
230	rankdir=LR;
231	app [label="reciprocal/application.meta_lic"];
232	bin1 [label="reciprocal/bin/bin1.meta_lic"];
233	bin2 [label="reciprocal/bin/bin2.meta_lic"];
234	bin3 [label="reciprocal/bin/bin3.meta_lic\nnotice"];
235	container [label="reciprocal/container.zip.meta_lic"];
236	apex [label="reciprocal/highest.apex.meta_lic"];
237	liba [label="reciprocal/lib/liba.so.meta_lic\nreciprocal"];
238	libb [label="reciprocal/lib/libb.so.meta_lic"];
239	libc [label="reciprocal/lib/libc.a.meta_lic\nreciprocal"];
240	libd [label="reciprocal/lib/libd.so.meta_lic\nnotice"];
241	app -> bin3 [label="toolchain"];
242	app -> liba [label="static"];
243	app -> libb [label="dynamic"];
244	bin1 -> liba [label="static"];
245	bin1 -> libc [label="static"];
246	bin2 -> libb [label="dynamic"];
247	bin2 -> libd [label="dynamic"];
248	container -> bin1 [label="static"];
249	container -> bin2 [label="static"];
250	container -> liba [label="static"];
251	container -> libb [label="static"];
252	apex -> bin1 [label="static"];
253	apex -> bin2 [label="static"];
254	apex -> liba [label="static"];
255	apex -> libb [label="static"];
256	{rank=same; app container apex}
257}
258```
259
260### restricted/ testdata introduces restricted source sharing conditions
261
262```dot
263strict digraph {
264	rankdir=LR;
265	app [label="restricted/application.meta_lic"];
266	bin1 [label="restricted/bin/bin1.meta_lic"];
267	bin2 [label="restricted/bin/bin2.meta_lic"];
268	bin3 [label="restricted/bin/bin3.meta_lic\nrestricted"];
269	container [label="restricted/container.zip.meta_lic"];
270	apex [label="restricted/highest.apex.meta_lic"];
271	liba [label="restricted/lib/liba.so.meta_lic\nrestricted"];
272	libb [label="restricted/lib/libb.so.meta_lic\nrestricted"];
273	libc [label="restricted/lib/libc.a.meta_lic\nreciprocal"];
274	libd [label="restricted/lib/libd.so.meta_lic\nnotice"];
275	app -> bin3 [label="toolchain"];
276	app -> liba [label="static"];
277	app -> libb [label="dynamic"];
278	bin1 -> liba [label="static"];
279	bin1 -> libc [label="static"];
280	bin2 -> libb [label="dynamic"];
281	bin2 -> libd [label="dynamic"];
282	container -> bin1 [label="static"];
283	container -> bin2 [label="static"];
284	container -> liba [label="static"];
285	container -> libb [label="static"];
286	apex -> bin1 [label="static"];
287	apex -> bin2 [label="static"];
288	apex -> liba [label="static"];
289	apex -> libb [label="static"];
290	{rank=same; app container apex}
291}
292```
293
294### proprietary/ testdata introduces privacy conditions
295
296```dot
297strict digraph {
298	rankdir=LR;
299	app [label="proprietary/application.meta_lic"];
300	bin1 [label="proprietary/bin/bin1.meta_lic"];
301	bin2 [label="proprietary/bin/bin2.meta_lic\nby_exception_only\nproprietary"];
302	bin3 [label="proprietary/bin/bin3.meta_lic\nrestricted"];
303	container [label="proprietary/container.zip.meta_lic"];
304	apex [label="proprietary/highest.apex.meta_lic"];
305	liba [label="proprietary/lib/liba.so.meta_lic\nby_exception_only\nproprietary"];
306	libb [label="proprietary/lib/libb.so.meta_lic\nrestricted"];
307	libc [label="proprietary/lib/libc.a.meta_lic\nby_exception_only\nproprietary"];
308	libd [label="proprietary/lib/libd.so.meta_lic\nnotice"];
309	app -> bin3 [label="toolchain"];
310	app -> liba [label="static"];
311	app -> libb [label="dynamic"];
312	bin1 -> liba [label="static"];
313	bin1 -> libc [label="static"];
314	bin2 -> libb [label="dynamic"];
315	bin2 -> libd [label="dynamic"];
316	container -> bin1 [label="static"];
317	container -> bin2 [label="static"];
318	container -> liba [label="static"];
319	container -> libb [label="static"];
320	apex -> bin1 [label="static"];
321	apex -> bin2 [label="static"];
322	apex -> liba [label="static"];
323	apex -> libb [label="static"];
324	{rank=same; app container apex}
325}
326```
327