Policy change: GPL+CE is permissive.
Bug: 210546823 Test: m cts compliance_checkshare compliancenotice_bom \ compliancenotice_shippedlibs compliance_listshare \ compliance_dumpgraph compliance_dumpresolutions htmlnotice \ compliance_rtrace textnotice xmlnotice Change-Id: I7da36972ffbb1494e33fd63db8e5ec851d47704c
This commit is contained in:
@@ -85,19 +85,13 @@ func TestPolicy_edgeConditions(t *testing.T) {
|
||||
{
|
||||
name: "independentmodulestatic",
|
||||
edge: annotated{"apacheBin.meta_lic", "gplWithClasspathException.meta_lic", []string{"static"}},
|
||||
expectedDepActions: []string{
|
||||
"apacheBin.meta_lic:gplWithClasspathException.meta_lic:restricted_with_classpath_exception",
|
||||
"gplWithClasspathException.meta_lic:gplWithClasspathException.meta_lic:restricted_with_classpath_exception",
|
||||
},
|
||||
expectedDepActions: []string{},
|
||||
expectedTargetConditions: []string{},
|
||||
},
|
||||
{
|
||||
name: "dependentmodule",
|
||||
edge: annotated{"dependentModule.meta_lic", "gplWithClasspathException.meta_lic", []string{"dynamic"}},
|
||||
expectedDepActions: []string{
|
||||
"dependentModule.meta_lic:gplWithClasspathException.meta_lic:restricted_with_classpath_exception",
|
||||
"gplWithClasspathException.meta_lic:gplWithClasspathException.meta_lic:restricted_with_classpath_exception",
|
||||
},
|
||||
expectedDepActions: []string{},
|
||||
expectedTargetConditions: []string{},
|
||||
},
|
||||
|
||||
@@ -166,13 +160,13 @@ func TestPolicy_edgeConditions(t *testing.T) {
|
||||
name: "independentmodulereversestatic",
|
||||
edge: annotated{"gplWithClasspathException.meta_lic", "apacheBin.meta_lic", []string{"static"}},
|
||||
expectedDepActions: []string{},
|
||||
expectedTargetConditions: []string{"gplWithClasspathException.meta_lic:restricted_with_classpath_exception"},
|
||||
expectedTargetConditions: []string{},
|
||||
},
|
||||
{
|
||||
name: "dependentmodulereverse",
|
||||
edge: annotated{"gplWithClasspathException.meta_lic", "dependentModule.meta_lic", []string{"dynamic"}},
|
||||
expectedDepActions: []string{},
|
||||
expectedTargetConditions: []string{"gplWithClasspathException.meta_lic:restricted_with_classpath_exception"},
|
||||
expectedTargetConditions: []string{},
|
||||
},
|
||||
{
|
||||
name: "ponr",
|
||||
@@ -257,9 +251,9 @@ func TestPolicy_edgeConditions(t *testing.T) {
|
||||
otherCs := otn.LicenseConditions()
|
||||
depConditions |= otherCs
|
||||
}
|
||||
t.Logf("calculate target actions for edge=%s, dep conditions=%04x, treatAsAggregate=%v", edge.String(), depConditions, tt.treatAsAggregate)
|
||||
t.Logf("calculate target actions for edge=%s, dep conditions=%#v %s, treatAsAggregate=%v", edge.String(), depConditions, depConditions, tt.treatAsAggregate)
|
||||
csActual := depConditionsPropagatingToTarget(lg, edge, depConditions, tt.treatAsAggregate)
|
||||
t.Logf("calculated target conditions as %04x{%s}", csActual, strings.Join(csActual.Names(), ", "))
|
||||
t.Logf("calculated target conditions as %#v %s", csActual, csActual)
|
||||
csExpected := NewLicenseConditionSet()
|
||||
for _, triple := range tt.expectedDepActions {
|
||||
fields := strings.Split(triple, ":")
|
||||
@@ -269,9 +263,9 @@ func TestPolicy_edgeConditions(t *testing.T) {
|
||||
}
|
||||
csExpected |= expectedConditions
|
||||
}
|
||||
t.Logf("expected target conditions as %04x{%s}", csExpected, strings.Join(csExpected.Names(), ", "))
|
||||
t.Logf("expected target conditions as %#v %s", csExpected, csExpected)
|
||||
if csActual != csExpected {
|
||||
t.Errorf("unexpected license conditions: got %04x, want %04x", csActual, csExpected)
|
||||
t.Errorf("unexpected license conditions: got %#v, want %#v", csActual, csExpected)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user