Commit graph

6 commits

Author SHA1 Message Date
Ibrahim Kanouche
f0c6cf501c Merge "Optimized project selection for getProjectMetadata" 2022-11-10 15:28:12 +00:00
Ibrahim Kanouche
a68ed086ab Optimized project selection for getProjectMetadata
Test: m compliance_sbom

Change-Id: I9e60b7e138a4fca74170954d8bb83862677e750f
2022-11-03 16:01:13 +00:00
Bob Badour
3afc3004f2 Fix final nits from noticeindex change.
Test: m droid dist cts alllicensemetadata
Change-Id: Ie446e5693a09f4ae1c936cdae6f1e668105541f0
2022-11-02 10:24:04 -07:00
Bob Badour
d6574e5c97 Add AllMetadataFiles() method to track deps.
Improve METADATA parsing error message.

Example error message (for an unqoted string url starting with ssh:):

============
  error in project "<redacted>" METADATA "<redacted>/METADATA": proto: (line 4:12): invalid value for string type: ssh

METADATA and METADATA.android files must parse as text protobufs
defined by
   build/soong/compliance/project_metadata_proto/project_metadata.proto

* unknown fields don't matter
* check invalid ENUM names
* check quoting
* check unescaped nested quotes
* check the comment marker for protobuf is '#' not '//'

if importing a library that uses a different sort of METADATA file, add
a METADATA.android file beside it to parse instead
============

Bug: 254534552

Test: m droid dist cts alllicensemetadata

Change-Id: Ie5c0adc7362941e455dd522baaa31f2913d7db5f
2022-10-27 18:12:30 -07:00
Ibrahim Kanouche
776ad80e68 Added functions to projectmetadata to retrieve
additional project info

Test: m droid

Bug: 254901942
Change-Id: I3de4bc528bd321c76900d277295bb10709035a9c
2022-10-22 01:22:53 +00:00
Bob Badour
dc62de4760 Refactor projectmetadata into separate package.
Replace regular expressions to extract fields from a text proto with
and actual parsed protobuf.

Refactor TestFS into its own package, and implement StatFS.

Test: m droid dist cts alllicensemetadata

Test: repo forall -c 'echo -n "$REPO_PATH  " && $ANDROID_BUILD_TOP/out/host/linux-x86/bin/compliance_checkmetadata . 2>&1' | fgrep -v PASS

Change-Id: Icd17a6a2b6a4e2b6ffded48e964b9c9d6e4d64d6
2022-10-18 16:55:47 -07:00