Merge "Resolve test crash in build/make/tools/compliance."
This commit is contained in:
commit
69227ff9ae
3 changed files with 8 additions and 4 deletions
|
@ -35,7 +35,7 @@ import (
|
|||
"github.com/google/blueprint/deptools"
|
||||
|
||||
"github.com/spdx/tools-golang/builder/builder2v2"
|
||||
"github.com/spdx/tools-golang/json"
|
||||
spdx_json "github.com/spdx/tools-golang/json"
|
||||
"github.com/spdx/tools-golang/spdx/common"
|
||||
spdx "github.com/spdx/tools-golang/spdx/v2_2"
|
||||
"github.com/spdx/tools-golang/spdxlib"
|
||||
|
@ -274,7 +274,7 @@ func getProjectMetadata(_ *context, pmix *projectmetadata.Index,
|
|||
tn *compliance.TargetNode) (*projectmetadata.ProjectMetadata, error) {
|
||||
pms, err := pmix.MetadataForProjects(tn.Projects()...)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Unable to read projects for %q: %w\n", tn, err)
|
||||
return nil, fmt.Errorf("Unable to read projects for %q: %w\n", tn.Name(), err)
|
||||
}
|
||||
if len(pms) == 0 {
|
||||
return nil, nil
|
||||
|
|
|
@ -25,6 +25,7 @@ import (
|
|||
"time"
|
||||
|
||||
"android/soong/tools/compliance"
|
||||
|
||||
"github.com/spdx/tools-golang/builder/builder2v2"
|
||||
"github.com/spdx/tools-golang/spdx/common"
|
||||
spdx "github.com/spdx/tools-golang/spdx/v2_2"
|
||||
|
@ -2375,8 +2376,8 @@ func validate(doc *spdx.Document) error {
|
|||
if doc.DocumentName == "" {
|
||||
return fmt.Errorf("DocumentName: got nothing, want Document Name")
|
||||
}
|
||||
if fmt.Sprintf("%v", doc.CreationInfo.Creators[1].Creator) != "Google LLC" {
|
||||
return fmt.Errorf("Creator: got %v, want 'Google LLC'")
|
||||
if c := fmt.Sprintf("%v", doc.CreationInfo.Creators[1].Creator); c != "Google LLC" {
|
||||
return fmt.Errorf("Creator: got %v, want 'Google LLC'", c)
|
||||
}
|
||||
_, err := time.Parse(time.RFC3339, doc.CreationInfo.Created)
|
||||
if err != nil {
|
||||
|
|
|
@ -7,8 +7,11 @@ replace google.golang.org/protobuf v0.0.0 => ../../../../external/golang-protobu
|
|||
require (
|
||||
android/soong v0.0.0
|
||||
github.com/google/blueprint v0.0.0
|
||||
github.com/spdx/tools-golang v0.0.0
|
||||
)
|
||||
|
||||
replace github.com/spdx/tools-golang v0.0.0 => ../../../../external/spdx-tools
|
||||
|
||||
require golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
|
||||
|
||||
replace android/soong v0.0.0 => ../../../soong
|
||||
|
|
Loading…
Reference in a new issue