Change condition to match go/thirdpartylicenses

Policy uses restricted_if_statically_linked at
https://opensource.google/documentation/reference/thirdparty/licenses#RestrictedIfStaticallyLinked

Test: m droid
Change-Id: I9b18d3133ae72de1bede99f46b530298313bc2e6
This commit is contained in:
Bob Badour
2022-11-22 12:04:10 -08:00
parent dd026fce63
commit cac8a3cf09
14 changed files with 324 additions and 324 deletions

View File

@@ -44,9 +44,9 @@ func Test_plaintext(t *testing.T) {
expectedOut []string
}{
{
condition: "firstparty",
name: "apex",
roots: []string{"highest.apex.meta_lic"},
condition: "firstparty",
name: "apex",
roots: []string{"highest.apex.meta_lic"},
expectedOut: []string{},
},
{
@@ -60,33 +60,33 @@ func Test_plaintext(t *testing.T) {
expectedOut: []string{},
},
{
condition: "firstparty",
name: "container",
roots: []string{"container.zip.meta_lic"},
condition: "firstparty",
name: "container",
roots: []string{"container.zip.meta_lic"},
expectedOut: []string{},
},
{
condition: "firstparty",
name: "application",
roots: []string{"application.meta_lic"},
condition: "firstparty",
name: "application",
roots: []string{"application.meta_lic"},
expectedOut: []string{},
},
{
condition: "firstparty",
name: "binary",
roots: []string{"bin/bin1.meta_lic"},
condition: "firstparty",
name: "binary",
roots: []string{"bin/bin1.meta_lic"},
expectedOut: []string{},
},
{
condition: "firstparty",
name: "library",
roots: []string{"lib/libd.so.meta_lic"},
condition: "firstparty",
name: "library",
roots: []string{"lib/libd.so.meta_lic"},
expectedOut: []string{},
},
{
condition: "notice",
name: "apex",
roots: []string{"highest.apex.meta_lic"},
condition: "notice",
name: "apex",
roots: []string{"highest.apex.meta_lic"},
expectedOut: []string{},
},
{
@@ -100,33 +100,33 @@ func Test_plaintext(t *testing.T) {
expectedOut: []string{},
},
{
condition: "notice",
name: "container",
roots: []string{"container.zip.meta_lic"},
condition: "notice",
name: "container",
roots: []string{"container.zip.meta_lic"},
expectedOut: []string{},
},
{
condition: "notice",
name: "application",
roots: []string{"application.meta_lic"},
condition: "notice",
name: "application",
roots: []string{"application.meta_lic"},
expectedOut: []string{},
},
{
condition: "notice",
name: "binary",
roots: []string{"bin/bin1.meta_lic"},
condition: "notice",
name: "binary",
roots: []string{"bin/bin1.meta_lic"},
expectedOut: []string{},
},
{
condition: "notice",
name: "library",
roots: []string{"lib/libd.so.meta_lic"},
condition: "notice",
name: "library",
roots: []string{"lib/libd.so.meta_lic"},
expectedOut: []string{},
},
{
condition: "reciprocal",
name: "apex",
roots: []string{"highest.apex.meta_lic"},
condition: "reciprocal",
name: "apex",
roots: []string{"highest.apex.meta_lic"},
expectedOut: []string{},
},
{
@@ -140,27 +140,27 @@ func Test_plaintext(t *testing.T) {
expectedOut: []string{},
},
{
condition: "reciprocal",
name: "container",
roots: []string{"container.zip.meta_lic"},
condition: "reciprocal",
name: "container",
roots: []string{"container.zip.meta_lic"},
expectedOut: []string{},
},
{
condition: "reciprocal",
name: "application",
roots: []string{"application.meta_lic"},
condition: "reciprocal",
name: "application",
roots: []string{"application.meta_lic"},
expectedOut: []string{},
},
{
condition: "reciprocal",
name: "binary",
roots: []string{"bin/bin1.meta_lic"},
condition: "reciprocal",
name: "binary",
roots: []string{"bin/bin1.meta_lic"},
expectedOut: []string{},
},
{
condition: "reciprocal",
name: "library",
roots: []string{"lib/libd.so.meta_lic"},
condition: "reciprocal",
name: "library",
roots: []string{"lib/libd.so.meta_lic"},
expectedOut: []string{},
},
{
@@ -168,7 +168,7 @@ func Test_plaintext(t *testing.T) {
name: "apex",
roots: []string{"highest.apex.meta_lic"},
expectedOut: []string{
"testdata/restricted/lib/liba.so.meta_lic restricted_allows_dynamic_linking",
"testdata/restricted/lib/liba.so.meta_lic restricted_if_statically_linked",
"testdata/restricted/lib/libb.so.meta_lic restricted",
},
},
@@ -180,7 +180,7 @@ func Test_plaintext(t *testing.T) {
sources: []string{"testdata/restricted/bin/bin1.meta_lic"},
stripPrefix: []string{"testdata/restricted/"},
},
expectedOut: []string{"lib/liba.so.meta_lic restricted_allows_dynamic_linking"},
expectedOut: []string{"lib/liba.so.meta_lic restricted_if_statically_linked"},
},
{
condition: "restricted",
@@ -197,32 +197,32 @@ func Test_plaintext(t *testing.T) {
name: "container",
roots: []string{"container.zip.meta_lic"},
expectedOut: []string{
"testdata/restricted/lib/liba.so.meta_lic restricted_allows_dynamic_linking",
"testdata/restricted/lib/liba.so.meta_lic restricted_if_statically_linked",
"testdata/restricted/lib/libb.so.meta_lic restricted",
},
},
{
condition: "restricted",
name: "application",
roots: []string{"application.meta_lic"},
expectedOut: []string{"testdata/restricted/lib/liba.so.meta_lic restricted_allows_dynamic_linking"},
condition: "restricted",
name: "application",
roots: []string{"application.meta_lic"},
expectedOut: []string{"testdata/restricted/lib/liba.so.meta_lic restricted_if_statically_linked"},
},
{
condition: "restricted",
name: "binary",
roots: []string{"bin/bin1.meta_lic"},
expectedOut: []string{"testdata/restricted/lib/liba.so.meta_lic restricted_allows_dynamic_linking"},
condition: "restricted",
name: "binary",
roots: []string{"bin/bin1.meta_lic"},
expectedOut: []string{"testdata/restricted/lib/liba.so.meta_lic restricted_if_statically_linked"},
},
{
condition: "restricted",
name: "library",
roots: []string{"lib/libd.so.meta_lic"},
condition: "restricted",
name: "library",
roots: []string{"lib/libd.so.meta_lic"},
expectedOut: []string{},
},
{
condition: "proprietary",
name: "apex",
roots: []string{"highest.apex.meta_lic"},
condition: "proprietary",
name: "apex",
roots: []string{"highest.apex.meta_lic"},
expectedOut: []string{"testdata/proprietary/lib/libb.so.meta_lic restricted"},
},
{
@@ -246,27 +246,27 @@ func Test_plaintext(t *testing.T) {
expectedOut: []string{"lib/libb.so.meta_lic restricted"},
},
{
condition: "proprietary",
name: "container",
roots: []string{"container.zip.meta_lic"},
condition: "proprietary",
name: "container",
roots: []string{"container.zip.meta_lic"},
expectedOut: []string{"testdata/proprietary/lib/libb.so.meta_lic restricted"},
},
{
condition: "proprietary",
name: "application",
roots: []string{"application.meta_lic"},
condition: "proprietary",
name: "application",
roots: []string{"application.meta_lic"},
expectedOut: []string{},
},
{
condition: "proprietary",
name: "binary",
roots: []string{"bin/bin1.meta_lic"},
condition: "proprietary",
name: "binary",
roots: []string{"bin/bin1.meta_lic"},
expectedOut: []string{},
},
{
condition: "proprietary",
name: "library",
roots: []string{"lib/libd.so.meta_lic"},
condition: "proprietary",
name: "library",
roots: []string{"lib/libd.so.meta_lic"},
expectedOut: []string{},
},
}