summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-03-17 00:13:36 +0000
committer Paul Duffin <paulduffin@google.com> 2021-03-18 12:18:09 +0000
commit1afa51592967c10b0e6be67b1f8fedddacbc6ce6 (patch)
tree2ca81fc0b43930d54325cff5e07610f28dbd8dbd
parentd518b7e2f2d6610b3f4cdf6b30fdcf0c57e9eef1 (diff)
Migrate android package to a per test build directory
Bug: 182885307 Test: m nothing Change-Id: I6b868bacc36be1f6768fbb2fb1d7ed4ad6e4118c
-rw-r--r--android/android_test.go26
1 files changed, 2 insertions, 24 deletions
diff --git a/android/android_test.go b/android/android_test.go
index 68cb70543..2a697fb85 100644
--- a/android/android_test.go
+++ b/android/android_test.go
@@ -15,34 +15,12 @@
package android
import (
- "io/ioutil"
"os"
"testing"
)
-var buildDir string
-
-func setUp() {
- var err error
- buildDir, err = ioutil.TempDir("", "soong_android_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 emptyTestFixtureFactory = NewFixtureFactory(&buildDir)
+var emptyTestFixtureFactory = NewFixtureFactory(nil)