Migrate sdk package to a per test build directory
Bug: 182885307
Test: m nothing
Change-Id: I051f2572ce5e94e2a3a66cf7663797178b7d1506
diff --git a/sdk/testing.go b/sdk/testing.go
index a5519f8..6df402c 100644
--- a/sdk/testing.go
+++ b/sdk/testing.go
@@ -16,8 +16,6 @@
import (
"fmt"
- "io/ioutil"
- "os"
"path/filepath"
"strings"
"testing"
@@ -30,7 +28,7 @@
)
var sdkFixtureFactory = android.NewFixtureFactory(
- &buildDir,
+ nil,
apex.PrepareForTestWithApexBuildComponents,
cc.PrepareForTestWithCcDefaultModules,
genrule.PrepareForTestWithGenRuleBuildComponents,
@@ -326,28 +324,3 @@
// The final output zip.
outputZip string
}
-
-var buildDir string
-
-func setUp() {
- var err error
- buildDir, err = ioutil.TempDir("", "soong_sdk_test")
- if err != nil {
- panic(err)
- }
-}
-
-func tearDown() {
- _ = os.RemoveAll(buildDir)
-}
-
-func runTestWithBuildDir(m *testing.M) {
- run := func() int {
- setUp()
- defer tearDown()
-
- return m.Run()
- }
-
- os.Exit(run())
-}