summaryrefslogtreecommitdiff
path: root/bpf/bpf_test.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-03-16 13:36:55 +0000
committer Paul Duffin <paulduffin@google.com> 2021-03-17 16:10:55 +0000
commit854d661572988dc2692e08340ac48c667ba8c0bb (patch)
treec56e6e8d906d47f9d847fd2c4891b158fb1d4d77 /bpf/bpf_test.go
parent45a497180892a47cd69758b9d9126b7c608485ce (diff)
Migrate bpf package to a per test build directory
Bug: 182885307 Test: m nothing Change-Id: I0ee9575af056057ca37831a3afebba2be1e54d27
Diffstat (limited to 'bpf/bpf_test.go')
-rw-r--r--bpf/bpf_test.go27
1 files changed, 2 insertions, 25 deletions
diff --git a/bpf/bpf_test.go b/bpf/bpf_test.go
index eb0d8c8f7..0bf15db75 100644
--- a/bpf/bpf_test.go
+++ b/bpf/bpf_test.go
@@ -15,7 +15,6 @@
package bpf
import (
- "io/ioutil"
"os"
"testing"
@@ -23,34 +22,12 @@ import (
"android/soong/cc"
)
-var buildDir string
-
-func setUp() {
- var err error
- buildDir, err = ioutil.TempDir("", "genrule_test")
- if err != nil {
- panic(err)
- }
-}
-
-func tearDown() {
- os.RemoveAll(buildDir)
-}
-
func TestMain(m *testing.M) {
- run := func() int {
- setUp()
- defer tearDown()
-
- return m.Run()
- }
-
- os.Exit(run())
-
+ os.Exit(m.Run())
}
var bpfFactory = android.NewFixtureFactory(
- &buildDir,
+ nil,
cc.PrepareForTestWithCcDefaultModules,
android.FixtureMergeMockFs(
map[string][]byte{