Support OUT_DIR for license graph.
Bug: 226066987 Test: OUT_DIR=/tmp/outdir m all listshare checkshare htmlnotice rtrace dumpgraph dumpresolutions compliancenotice_bom compliancenotice_shippedlibs Test: OUT_DIR=/tmp/outdir m /tmp/outdir/target/product/bonito/obj/NOTICE.xml.gz Test: m all listshare checkshare htmlnotice rtrace dumpgraph dumpresolutions compliancenotice_bom compliancenotice_shippedlibs Test: m out/target/product/bonito/obj/NOTICE.xml.gz Change-Id: I6282c647a389c5935d5ce7c79193f86d32c76365
This commit is contained in:
@@ -20,6 +20,8 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"android/soong/tools/compliance"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
@@ -36,6 +38,7 @@ func Test_plaintext(t *testing.T) {
|
||||
tests := []struct {
|
||||
condition string
|
||||
name string
|
||||
outDir string
|
||||
roots []string
|
||||
ctx context
|
||||
expectedOut []string
|
||||
@@ -289,7 +292,7 @@ func Test_plaintext(t *testing.T) {
|
||||
if len(tt.ctx.sources) < 1 {
|
||||
tt.ctx.sources = rootFiles
|
||||
}
|
||||
_, err := traceRestricted(&tt.ctx, stdout, stderr, rootFiles...)
|
||||
_, err := traceRestricted(&tt.ctx, stdout, stderr, compliance.GetFS(tt.outDir), rootFiles...)
|
||||
t.Logf("rtrace: stderr = %v", stderr)
|
||||
t.Logf("rtrace: stdout = %v", stdout)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user