summaryrefslogtreecommitdiff
path: root/bpf/bpf.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2019-05-14 16:05:20 -0700
committer Colin Cross <ccross@android.com> 2019-05-17 08:43:36 -0700
commit815daf95b2a019cc997484841d318ee86e3f8c08 (patch)
treed1d141e594991c6349cbd724d4f94a71273edcdc /bpf/bpf.go
parent0d99f7cd8419a16132dc0aa3a6f37697dc473aad (diff)
Add bpf_test.go to build and fix tests
bpf_test.go was not listed in testSrcs, which meant it was not run during the build, but ran and failed with go test android/soong/... Don't redeclare the cc module types and mutators, use exported functions from cc/testing.go instead, which contain a new dependency needed by cc modules. This reapplies I4542640e8ff08e71565ed50617dbe67d86b29b69 after fixes for mac tests. Test: m Test: go test android/soong/... Change-Id: I3dc3fdedbd7063df4a2e0cadf2a4e0711b1823ad
Diffstat (limited to 'bpf/bpf.go')
-rw-r--r--bpf/bpf.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bpf/bpf.go b/bpf/bpf.go
index 13468c73f..dcbf9adac 100644
--- a/bpf/bpf.go
+++ b/bpf/bpf.go
@@ -33,7 +33,7 @@ func init() {
var (
pctx = android.NewPackageContext("android/soong/bpf")
- cc = pctx.AndroidGomaStaticRule("cc",
+ ccRule = pctx.AndroidGomaStaticRule("ccRule",
blueprint.RuleParams{
Depfile: "${out}.d",
Deps: blueprint.DepsGCC,
@@ -82,7 +82,7 @@ func (bpf *bpf) GenerateAndroidBuildActions(ctx android.ModuleContext) {
obj := android.ObjPathWithExt(ctx, "", src, "o")
ctx.Build(pctx, android.BuildParams{
- Rule: cc,
+ Rule: ccRule,
Input: src,
Output: obj,
Args: map[string]string{