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
diff --git a/tools/compliance/conditionset_test.go b/tools/compliance/conditionset_test.go
index 020cc0c..e31360d 100644
--- a/tools/compliance/conditionset_test.go
+++ b/tools/compliance/conditionset_test.go
@@ -96,18 +96,18 @@
{
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 @@
"notice",
"reciprocal",
"restricted",
- "restricted_allows_dynamic_linking",
+ "restricted_if_statically_linked",
"proprietary",
"by_exception_only",
"not_allowed",
@@ -129,7 +129,7 @@
"notice",
"reciprocal",
"restricted",
- "restricted_allows_dynamic_linking",
+ "restricted_if_statically_linked",
"proprietary",
"by_exception_only",
"not_allowed",
@@ -148,7 +148,7 @@
"notice",
"reciprocal",
"restricted",
- "restricted_allows_dynamic_linking",
+ "restricted_if_statically_linked",
"proprietary",
"by_exception_only",
"not_allowed",
@@ -157,18 +157,18 @@
{
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 @@
"notice",
"reciprocal",
"restricted",
- "restricted_allows_dynamic_linking",
+ "restricted_if_statically_linked",
"proprietary",
"by_exception_only",
"not_allowed",
@@ -190,23 +190,23 @@
"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 @@
"notice",
"reciprocal",
"restricted",
- "restricted_allows_dynamic_linking",
+ "restricted_if_statically_linked",
"proprietary",
"by_exception_only",
"not_allowed",
@@ -238,41 +238,41 @@
"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 {