summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/mutator_test.go8
-rw-r--r--android/package_test.go12
-rw-r--r--android/path_properties_test.go8
3 files changed, 2 insertions, 26 deletions
diff --git a/android/mutator_test.go b/android/mutator_test.go
index 4cef40006..76bb5c8c2 100644
--- a/android/mutator_test.go
+++ b/android/mutator_test.go
@@ -15,8 +15,6 @@
package android
import (
- "io/ioutil"
- "os"
"reflect"
"testing"
@@ -56,12 +54,6 @@ func addMissingDependenciesMutator(ctx TopDownMutatorContext) {
}
func TestMutatorAddMissingDependencies(t *testing.T) {
- buildDir, err := ioutil.TempDir("", "soong_mutator_test")
- if err != nil {
- t.Fatal(err)
- }
- defer os.RemoveAll(buildDir)
-
config := TestConfig(buildDir, nil)
config.TestProductVariables.Allow_missing_dependencies = proptools.BoolPtr(true)
diff --git a/android/package_test.go b/android/package_test.go
index f1f47acb4..e5b055667 100644
--- a/android/package_test.go
+++ b/android/package_test.go
@@ -1,8 +1,6 @@
package android
import (
- "io/ioutil"
- "os"
"testing"
)
@@ -58,15 +56,9 @@ var packageTests = []struct {
}
func TestPackage(t *testing.T) {
- buildDir, err := ioutil.TempDir("", "soong_package_test")
- if err != nil {
- t.Fatal(err)
- }
- defer os.RemoveAll(buildDir)
-
for _, test := range packageTests {
t.Run(test.name, func(t *testing.T) {
- _, errs := testPackage(buildDir, test.fs)
+ _, errs := testPackage(test.fs)
expectedErrors := test.expectedErrors
if expectedErrors == nil {
@@ -89,7 +81,7 @@ func TestPackage(t *testing.T) {
}
}
-func testPackage(buildDir string, fs map[string][]byte) (*TestContext, []error) {
+func testPackage(fs map[string][]byte) (*TestContext, []error) {
// Create a new config per test as visibility information is stored in the config.
config := TestArchConfig(buildDir, nil)
diff --git a/android/path_properties_test.go b/android/path_properties_test.go
index fa187fa6f..e98c1365b 100644
--- a/android/path_properties_test.go
+++ b/android/path_properties_test.go
@@ -15,8 +15,6 @@
package android
import (
- "io/ioutil"
- "os"
"reflect"
"testing"
)
@@ -85,12 +83,6 @@ func TestPathDepsMutator(t *testing.T) {
},
}
- buildDir, err := ioutil.TempDir("", "soong_path_properties_test")
- if err != nil {
- t.Fatal(err)
- }
- defer os.RemoveAll(buildDir)
-
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
config := TestArchConfig(buildDir, nil)