Regression testcase for shipped vs nonshipped.
Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Test: m systemlicense Test: m listshare; out/soong/host/linux-x86/bin/listshare ... Test: m checkshare; out/soong/host/linux-x86/bin/checkshare ... Test: m dumpgraph; out/soong/host/linux-x86/dumpgraph ... Test: m dumpresolutions; out/soong/host/linux-x86/dumpresolutions ... where ... is the path to the .meta_lic file for the system image. In my case if $ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD) ... can be expressed as: ${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic Change-Id: I17221ec8fe429b5f745c0733f8bb1ab0ea2f4567
This commit is contained in:
@@ -357,6 +357,98 @@ func Test(t *testing.T) {
|
||||
roots: []string{"lib/libd.so.meta_lic"},
|
||||
expectedOut: []projectShare{},
|
||||
},
|
||||
{
|
||||
condition: "regressgpl1",
|
||||
name: "container",
|
||||
roots: []string{"container.zip.meta_lic"},
|
||||
expectedOut: []projectShare{
|
||||
{
|
||||
project: "bin/threelibraries",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
{
|
||||
project: "container/zip",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
condition: "regressgpl1",
|
||||
name: "containerplus",
|
||||
roots: []string{"container.zip.meta_lic", "lib/libapache.so.meta_lic", "lib/libc++.so.meta_lic"},
|
||||
expectedOut: []projectShare{
|
||||
{
|
||||
project: "bin/threelibraries",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
{
|
||||
project: "container/zip",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
{
|
||||
project: "lib/apache",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
{
|
||||
project: "lib/c++",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
condition: "regressgpl2",
|
||||
name: "container",
|
||||
roots: []string{"container.zip.meta_lic"},
|
||||
expectedOut: []projectShare{
|
||||
{
|
||||
project: "bin/threelibraries",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
{
|
||||
project: "container/zip",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
{
|
||||
project: "lib/apache",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
{
|
||||
project: "lib/c++",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
{
|
||||
project: "lib/gpl",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
condition: "regressgpl2",
|
||||
name: "containerplus",
|
||||
roots: []string{"container.zip.meta_lic", "lib/libapache.so.meta_lic", "lib/libc++.so.meta_lic"},
|
||||
expectedOut: []projectShare{
|
||||
{
|
||||
project: "bin/threelibraries",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
{
|
||||
project: "container/zip",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
{
|
||||
project: "lib/apache",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
{
|
||||
project: "lib/c++",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
{
|
||||
project: "lib/gpl",
|
||||
conditions: []string{"restricted"},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.condition+" "+tt.name, func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user