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

@@ -96,18 +96,18 @@ func TestConditionSet(t *testing.T) {
{
name: "everything",
conditions: []string{"unencumbered", "permissive", "notice", "reciprocal", "restricted", "proprietary"},
plus: &[]string{"restricted_allows_dynamic_linking", "by_exception_only", "not_allowed"},
plus: &[]string{"restricted_if_statically_linked", "by_exception_only", "not_allowed"},
matchingAny: map[string][]string{
"unencumbered": []string{"unencumbered"},
"permissive": []string{"permissive"},
"notice": []string{"notice"},
"reciprocal": []string{"reciprocal"},
"restricted": []string{"restricted"},
"restricted_allows_dynamic_linking": []string{"restricted_allows_dynamic_linking"},
"proprietary": []string{"proprietary"},
"by_exception_only": []string{"by_exception_only"},
"not_allowed": []string{"not_allowed"},
"notice|proprietary": []string{"notice", "proprietary"},
"unencumbered": []string{"unencumbered"},
"permissive": []string{"permissive"},
"notice": []string{"notice"},
"reciprocal": []string{"reciprocal"},
"restricted": []string{"restricted"},
"restricted_if_statically_linked": []string{"restricted_if_statically_linked"},
"proprietary": []string{"proprietary"},
"by_exception_only": []string{"by_exception_only"},
"not_allowed": []string{"not_allowed"},
"notice|proprietary": []string{"notice", "proprietary"},
},
expected: []string{
"unencumbered",
@@ -115,7 +115,7 @@ func TestConditionSet(t *testing.T) {
"notice",
"reciprocal",
"restricted",
"restricted_allows_dynamic_linking",
"restricted_if_statically_linked",
"proprietary",
"by_exception_only",
"not_allowed",
@@ -129,7 +129,7 @@ func TestConditionSet(t *testing.T) {
"notice",
"reciprocal",
"restricted",
"restricted_allows_dynamic_linking",
"restricted_if_statically_linked",
"proprietary",
"by_exception_only",
"not_allowed",
@@ -148,7 +148,7 @@ func TestConditionSet(t *testing.T) {
"notice",
"reciprocal",
"restricted",
"restricted_allows_dynamic_linking",
"restricted_if_statically_linked",
"proprietary",
"by_exception_only",
"not_allowed",
@@ -157,18 +157,18 @@ func TestConditionSet(t *testing.T) {
{
name: "allbutone",
conditions: []string{"unencumbered", "permissive", "notice", "reciprocal", "restricted", "proprietary"},
plus: &[]string{"restricted_allows_dynamic_linking", "by_exception_only", "not_allowed"},
plus: &[]string{"restricted_if_statically_linked", "by_exception_only", "not_allowed"},
matchingAny: map[string][]string{
"unencumbered": []string{"unencumbered"},
"permissive": []string{"permissive"},
"notice": []string{"notice"},
"reciprocal": []string{"reciprocal"},
"restricted": []string{"restricted"},
"restricted_allows_dynamic_linking": []string{"restricted_allows_dynamic_linking"},
"proprietary": []string{"proprietary"},
"by_exception_only": []string{"by_exception_only"},
"not_allowed": []string{"not_allowed"},
"notice|proprietary": []string{"notice", "proprietary"},
"unencumbered": []string{"unencumbered"},
"permissive": []string{"permissive"},
"notice": []string{"notice"},
"reciprocal": []string{"reciprocal"},
"restricted": []string{"restricted"},
"restricted_if_statically_linked": []string{"restricted_if_statically_linked"},
"proprietary": []string{"proprietary"},
"by_exception_only": []string{"by_exception_only"},
"not_allowed": []string{"not_allowed"},
"notice|proprietary": []string{"notice", "proprietary"},
},
expected: []string{
"unencumbered",
@@ -176,7 +176,7 @@ func TestConditionSet(t *testing.T) {
"notice",
"reciprocal",
"restricted",
"restricted_allows_dynamic_linking",
"restricted_if_statically_linked",
"proprietary",
"by_exception_only",
"not_allowed",
@@ -190,23 +190,23 @@ func TestConditionSet(t *testing.T) {
"notice",
"reciprocal",
"restricted",
"restricted_allows_dynamic_linking",
"restricted_if_statically_linked",
"proprietary",
"by_exception_only",
"not_allowed",
},
minus: &[]string{"restricted_allows_dynamic_linking"},
minus: &[]string{"restricted_if_statically_linked"},
matchingAny: map[string][]string{
"unencumbered": []string{"unencumbered"},
"permissive": []string{"permissive"},
"notice": []string{"notice"},
"reciprocal": []string{"reciprocal"},
"restricted": []string{"restricted"},
"restricted_allows_dynamic_linking": []string{},
"proprietary": []string{"proprietary"},
"by_exception_only": []string{"by_exception_only"},
"not_allowed": []string{"not_allowed"},
"restricted|proprietary": []string{"restricted", "proprietary"},
"unencumbered": []string{"unencumbered"},
"permissive": []string{"permissive"},
"notice": []string{"notice"},
"reciprocal": []string{"reciprocal"},
"restricted": []string{"restricted"},
"restricted_if_statically_linked": []string{},
"proprietary": []string{"proprietary"},
"by_exception_only": []string{"by_exception_only"},
"not_allowed": []string{"not_allowed"},
"restricted|proprietary": []string{"restricted", "proprietary"},
},
expected: []string{
"unencumbered",
@@ -227,7 +227,7 @@ func TestConditionSet(t *testing.T) {
"notice",
"reciprocal",
"restricted",
"restricted_allows_dynamic_linking",
"restricted_if_statically_linked",
"proprietary",
"by_exception_only",
"not_allowed",
@@ -238,41 +238,41 @@ func TestConditionSet(t *testing.T) {
"notice",
"reciprocal",
"restricted",
"restricted_allows_dynamic_linking",
"restricted_if_statically_linked",
"proprietary",
"by_exception_only",
"not_allowed",
},
matchingAny: map[string][]string{
"unencumbered": []string{},
"permissive": []string{},
"notice": []string{},
"reciprocal": []string{},
"restricted": []string{},
"restricted_allows_dynamic_linking": []string{},
"proprietary": []string{},
"by_exception_only": []string{},
"not_allowed": []string{},
"restricted|proprietary": []string{},
"unencumbered": []string{},
"permissive": []string{},
"notice": []string{},
"reciprocal": []string{},
"restricted": []string{},
"restricted_if_statically_linked": []string{},
"proprietary": []string{},
"by_exception_only": []string{},
"not_allowed": []string{},
"restricted|proprietary": []string{},
},
expected: []string{},
},
{
name: "restrictedplus",
conditions: []string{"restricted", "restricted_allows_dynamic_linking"},
conditions: []string{"restricted", "restricted_if_statically_linked"},
plus: &[]string{"permissive", "notice", "restricted", "proprietary"},
matchingAny: map[string][]string{
"unencumbered": []string{},
"permissive": []string{"permissive"},
"notice": []string{"notice"},
"restricted": []string{"restricted"},
"restricted_allows_dynamic_linking": []string{"restricted_allows_dynamic_linking"},
"proprietary": []string{"proprietary"},
"restricted|proprietary": []string{"restricted", "proprietary"},
"by_exception_only": []string{},
"proprietary|by_exception_only": []string{"proprietary"},
"unencumbered": []string{},
"permissive": []string{"permissive"},
"notice": []string{"notice"},
"restricted": []string{"restricted"},
"restricted_if_statically_linked": []string{"restricted_if_statically_linked"},
"proprietary": []string{"proprietary"},
"restricted|proprietary": []string{"restricted", "proprietary"},
"by_exception_only": []string{},
"proprietary|by_exception_only": []string{"proprietary"},
},
expected: []string{"permissive", "notice", "restricted", "restricted_allows_dynamic_linking", "proprietary"},
expected: []string{"permissive", "notice", "restricted", "restricted_if_statically_linked", "proprietary"},
},
}
for _, tt := range tests {