Regularize command-line flags.
All the notice binaries have -title
All the binaries that can -stripPrefix can strip multiple.
Bug: 68860345
Bug: 151177513
Bug: 151953481
Bug: 213388645
Bug: 210912771
Test: m all
Test: m systemlicense
Test: m bom; out/soong/host/linux-x85/bom ...
Test: m dumpgraph; out/soong/host/linux-x85/dumpgraph ...
Test: m dumpresolutions; out/soong/host/linux-x85/dumpresolutions ...
Test: m htmlnotice; out/soong/host/linux-x85/htmlnotice ...
Test: m rtrace; out/soong/host/linux-x85/rtrace ...
Test: m textnotice; out/soong/host/linux-x85/textnotice ...
Test: m xmlnotice; out/soong/host/linux-x85/xmlnotice ...
where ... is the path to the .meta_lic file for the system image. In my
case if
$ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD)
... can be expressed as:
${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic
Change-Id: I08357bf1adb048abba6563cf3cea6ee6d60405e0
diff --git a/tools/compliance/cmd/dumpgraph/dumpgraph_test.go b/tools/compliance/cmd/dumpgraph/dumpgraph_test.go
index 516c1db..67b2b40 100644
--- a/tools/compliance/cmd/dumpgraph/dumpgraph_test.go
+++ b/tools/compliance/cmd/dumpgraph/dumpgraph_test.go
@@ -59,7 +59,7 @@
condition: "firstparty",
name: "apex_trimmed",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/firstparty/"},
+ ctx: context{stripPrefix: []string{"testdata/firstparty/"}},
expectedOut: []string{
"bin/bin1.meta_lic lib/liba.so.meta_lic static",
"bin/bin1.meta_lic lib/libc.a.meta_lic static",
@@ -75,7 +75,7 @@
condition: "firstparty",
name: "apex_trimmed_labelled",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/firstparty/", labelConditions: true},
+ ctx: context{stripPrefix: []string{"testdata/firstparty/"}, labelConditions: true},
expectedOut: []string{
"bin/bin1.meta_lic:notice lib/liba.so.meta_lic:notice static",
"bin/bin1.meta_lic:notice lib/libc.a.meta_lic:notice static",
@@ -146,7 +146,7 @@
condition: "notice",
name: "apex_trimmed",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/notice/"},
+ ctx: context{stripPrefix: []string{"testdata/notice/"}},
expectedOut: []string{
"bin/bin1.meta_lic lib/liba.so.meta_lic static",
"bin/bin1.meta_lic lib/libc.a.meta_lic static",
@@ -162,7 +162,7 @@
condition: "notice",
name: "apex_trimmed_labelled",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/notice/", labelConditions: true},
+ ctx: context{stripPrefix: []string{"testdata/notice/"}, labelConditions: true},
expectedOut: []string{
"bin/bin1.meta_lic:notice lib/liba.so.meta_lic:notice static",
"bin/bin1.meta_lic:notice lib/libc.a.meta_lic:notice static",
@@ -233,7 +233,7 @@
condition: "reciprocal",
name: "apex_trimmed",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/reciprocal/"},
+ ctx: context{stripPrefix: []string{"testdata/reciprocal/"}},
expectedOut: []string{
"bin/bin1.meta_lic lib/liba.so.meta_lic static",
"bin/bin1.meta_lic lib/libc.a.meta_lic static",
@@ -249,7 +249,7 @@
condition: "reciprocal",
name: "apex_trimmed_labelled",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/reciprocal/", labelConditions: true},
+ ctx: context{stripPrefix: []string{"testdata/reciprocal/"}, labelConditions: true},
expectedOut: []string{
"bin/bin1.meta_lic:notice lib/liba.so.meta_lic:reciprocal static",
"bin/bin1.meta_lic:notice lib/libc.a.meta_lic:reciprocal static",
@@ -320,7 +320,7 @@
condition: "restricted",
name: "apex_trimmed",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/restricted/"},
+ ctx: context{stripPrefix: []string{"testdata/restricted/"}},
expectedOut: []string{
"bin/bin1.meta_lic lib/liba.so.meta_lic static",
"bin/bin1.meta_lic lib/libc.a.meta_lic static",
@@ -336,7 +336,7 @@
condition: "restricted",
name: "apex_trimmed_labelled",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/restricted/", labelConditions: true},
+ ctx: context{stripPrefix: []string{"testdata/restricted/"}, labelConditions: true},
expectedOut: []string{
"bin/bin1.meta_lic:notice lib/liba.so.meta_lic:restricted_allows_dynamic_linking static",
"bin/bin1.meta_lic:notice lib/libc.a.meta_lic:reciprocal static",
@@ -407,7 +407,7 @@
condition: "proprietary",
name: "apex_trimmed",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/proprietary/"},
+ ctx: context{stripPrefix: []string{"testdata/proprietary/"}},
expectedOut: []string{
"bin/bin1.meta_lic lib/liba.so.meta_lic static",
"bin/bin1.meta_lic lib/libc.a.meta_lic static",
@@ -423,7 +423,7 @@
condition: "proprietary",
name: "apex_trimmed_labelled",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/proprietary/", labelConditions: true},
+ ctx: context{stripPrefix: []string{"testdata/proprietary/"}, labelConditions: true},
expectedOut: []string{
"bin/bin1.meta_lic:notice lib/liba.so.meta_lic:by_exception_only:proprietary static",
"bin/bin1.meta_lic:notice lib/libc.a.meta_lic:by_exception_only:proprietary static",
@@ -613,7 +613,7 @@
condition: "firstparty",
name: "apex_trimmed",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/firstparty/"},
+ ctx: context{stripPrefix: []string{"testdata/firstparty/"}},
expectedOut: []getMatcher{
matchTarget("bin/bin1.meta_lic"),
matchTarget("bin/bin2.meta_lic"),
@@ -636,7 +636,7 @@
condition: "firstparty",
name: "apex_trimmed_labelled",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/firstparty/", labelConditions: true},
+ ctx: context{stripPrefix: []string{"testdata/firstparty/"}, labelConditions: true},
expectedOut: []getMatcher{
matchTarget("bin/bin1.meta_lic", "notice"),
matchTarget("bin/bin2.meta_lic", "notice"),
@@ -735,7 +735,7 @@
condition: "notice",
name: "apex_trimmed",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/notice/"},
+ ctx: context{stripPrefix: []string{"testdata/notice/"}},
expectedOut: []getMatcher{
matchTarget("bin/bin1.meta_lic"),
matchTarget("bin/bin2.meta_lic"),
@@ -758,7 +758,7 @@
condition: "notice",
name: "apex_trimmed_labelled",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/notice/", labelConditions: true},
+ ctx: context{stripPrefix: []string{"testdata/notice/"}, labelConditions: true},
expectedOut: []getMatcher{
matchTarget("bin/bin1.meta_lic", "notice"),
matchTarget("bin/bin2.meta_lic", "notice"),
@@ -857,7 +857,7 @@
condition: "reciprocal",
name: "apex_trimmed",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/reciprocal/"},
+ ctx: context{stripPrefix: []string{"testdata/reciprocal/"}},
expectedOut: []getMatcher{
matchTarget("bin/bin1.meta_lic"),
matchTarget("bin/bin2.meta_lic"),
@@ -880,7 +880,7 @@
condition: "reciprocal",
name: "apex_trimmed_labelled",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/reciprocal/", labelConditions: true},
+ ctx: context{stripPrefix: []string{"testdata/reciprocal/"}, labelConditions: true},
expectedOut: []getMatcher{
matchTarget("bin/bin1.meta_lic", "notice"),
matchTarget("bin/bin2.meta_lic", "notice"),
@@ -979,7 +979,7 @@
condition: "restricted",
name: "apex_trimmed",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/restricted/"},
+ ctx: context{stripPrefix: []string{"testdata/restricted/"}},
expectedOut: []getMatcher{
matchTarget("bin/bin1.meta_lic"),
matchTarget("bin/bin2.meta_lic"),
@@ -1002,7 +1002,7 @@
condition: "restricted",
name: "apex_trimmed_labelled",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/restricted/", labelConditions: true},
+ ctx: context{stripPrefix: []string{"testdata/restricted/"}, labelConditions: true},
expectedOut: []getMatcher{
matchTarget("bin/bin1.meta_lic", "notice"),
matchTarget("bin/bin2.meta_lic", "notice"),
@@ -1101,7 +1101,7 @@
condition: "proprietary",
name: "apex_trimmed",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/proprietary/"},
+ ctx: context{stripPrefix: []string{"testdata/proprietary/"}},
expectedOut: []getMatcher{
matchTarget("bin/bin1.meta_lic"),
matchTarget("bin/bin2.meta_lic"),
@@ -1124,7 +1124,7 @@
condition: "proprietary",
name: "apex_trimmed_labelled",
roots: []string{"highest.apex.meta_lic"},
- ctx: context{stripPrefix: "testdata/proprietary/", labelConditions: true},
+ ctx: context{stripPrefix: []string{"testdata/proprietary/"}, labelConditions: true},
expectedOut: []getMatcher{
matchTarget("bin/bin1.meta_lic", "notice"),
matchTarget("bin/bin2.meta_lic", "by_exception_only", "proprietary"),