Share buildDir for android/soong/android tests

There is no need to create a separate buildDir for each test
file, use TestMain to create a global one for the package.

Test: all soong tests
Change-Id: I435ee7aa88b7e0bb8ccc1ba79f82833a7accf3e9
This commit is contained in:
Colin Cross
2019-06-10 14:32:38 -07:00
parent 6c4f21f3a1
commit 2ffb9a8d7d
11 changed files with 48 additions and 94 deletions

View File

@@ -16,8 +16,6 @@ package android
import (
"fmt"
"io/ioutil"
"os"
"testing"
"github.com/google/blueprint"
@@ -127,12 +125,6 @@ var prebuiltsTests = []struct {
}
func TestPrebuilts(t *testing.T) {
buildDir, err := ioutil.TempDir("", "soong_prebuilt_test")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(buildDir)
config := TestConfig(buildDir, nil)
for _, test := range prebuiltsTests {