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:
@@ -15,19 +15,11 @@
|
||||
package android
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func testVtsConfig(test *testing.T, bpFileContents string) *TestContext {
|
||||
buildDir, err := ioutil.TempDir("", "soong_vts_config_test")
|
||||
if err != nil {
|
||||
test.Fatal(err)
|
||||
}
|
||||
|
||||
config := TestArchConfig(buildDir, nil)
|
||||
defer func() { os.RemoveAll(buildDir) }()
|
||||
|
||||
ctx := NewTestArchContext()
|
||||
ctx.RegisterModuleType("vts_config", ModuleFactoryAdaptor(VtsConfigFactory))
|
||||
|
Reference in New Issue
Block a user