Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0f05c9e authored by Colin Cross's avatar Colin Cross
Browse files

Move compliance commands into subdirectories

Move each compliance command into its own directory to avoid Go tooling
considering all the files to be a single package and complaining about
conflicting global names.

Test: go test ./...
Change-Id: I3db6310e7368bcc7fe6a3704b40a84078ed44209
parent 38a61931
Loading
Loading
Loading
Loading
+16 −16
Original line number Diff line number Diff line
@@ -19,58 +19,58 @@ package {

blueprint_go_binary {
    name: "bom",
    srcs: ["cmd/bom.go"],
    srcs: ["cmd/bom/bom.go"],
    deps: ["compliance-module"],
    testSrcs: ["cmd/bom_test.go"],
    testSrcs: ["cmd/bom/bom_test.go"],
}

blueprint_go_binary {
    name: "checkshare",
    srcs: ["cmd/checkshare.go"],
    srcs: ["cmd/checkshare/checkshare.go"],
    deps: ["compliance-module"],
    testSrcs: ["cmd/checkshare_test.go"],
    testSrcs: ["cmd/checkshare/checkshare_test.go"],
}

blueprint_go_binary {
    name: "listshare",
    srcs: ["cmd/listshare.go"],
    srcs: ["cmd/listshare/listshare.go"],
    deps: ["compliance-module"],
    testSrcs: ["cmd/listshare_test.go"],
    testSrcs: ["cmd/listshare/listshare_test.go"],
}

blueprint_go_binary {
    name: "dumpgraph",
    srcs: ["cmd/dumpgraph.go"],
    srcs: ["cmd/dumpgraph/dumpgraph.go"],
    deps: ["compliance-module"],
    testSrcs: ["cmd/dumpgraph_test.go"],
    testSrcs: ["cmd/dumpgraph/dumpgraph_test.go"],
}

blueprint_go_binary {
    name: "dumpresolutions",
    srcs: ["cmd/dumpresolutions.go"],
    srcs: ["cmd/dumpresolutions/dumpresolutions.go"],
    deps: ["compliance-module"],
    testSrcs: ["cmd/dumpresolutions_test.go"],
    testSrcs: ["cmd/dumpresolutions/dumpresolutions_test.go"],
}

blueprint_go_binary {
    name: "htmlnotice",
    srcs: ["cmd/htmlnotice.go"],
    srcs: ["cmd/htmlnotice/htmlnotice.go"],
    deps: ["compliance-module"],
    testSrcs: ["cmd/htmlnotice_test.go"],
    testSrcs: ["cmd/htmlnotice/htmlnotice_test.go"],
}

blueprint_go_binary {
    name: "shippedlibs",
    srcs: ["cmd/shippedlibs.go"],
    srcs: ["cmd/shippedlibs/shippedlibs.go"],
    deps: ["compliance-module"],
    testSrcs: ["cmd/shippedlibs_test.go"],
    testSrcs: ["cmd/shippedlibs/shippedlibs_test.go"],
}

blueprint_go_binary {
    name: "textnotice",
    srcs: ["cmd/textnotice.go"],
    srcs: ["cmd/textnotice/textnotice.go"],
    deps: ["compliance-module"],
    testSrcs: ["cmd/textnotice_test.go"],
    testSrcs: ["cmd/textnotice/textnotice_test.go"],
}

bootstrap_go_package {
+11 −0
Original line number Diff line number Diff line
@@ -17,11 +17,22 @@ package main
import (
	"bufio"
	"bytes"
	"fmt"
	"os"
	"strings"
	"testing"
)

func TestMain(m *testing.M) {
	// Change into the parent directory before running the tests
	// so they can find the testdata directory.
	if err := os.Chdir(".."); err != nil {
		fmt.Printf("failed to change to testdata directory: %s\n", err)
		os.Exit(1)
	}
	os.Exit(m.Run())
}

func Test(t *testing.T) {
	tests := []struct {
		condition   string
+11 −0
Original line number Diff line number Diff line
@@ -17,10 +17,21 @@ package main
import (
	"bytes"
	"fmt"
	"os"
	"strings"
	"testing"
)

func TestMain(m *testing.M) {
	// Change into the parent directory before running the tests
	// so they can find the testdata directory.
	if err := os.Chdir(".."); err != nil {
		fmt.Printf("failed to change to testdata directory: %s\n", err)
		os.Exit(1)
	}
	os.Exit(m.Run())
}

type outcome struct {
	target           string
	privacyCondition string
Loading