diff options
author | Dan Willemsen <dwillemsen@google.com> | 2017-07-06 16:59:48 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2017-07-06 18:09:46 -0700 |
commit | 00269f23ee1c2d03d7fa88aada4911f7da25f531 (patch) | |
tree | be521c20e103466b23a9bf91bd4e73806d3f62f9 /android/config.go | |
parent | 4c35af09ea774288959b347d81365329b13be3a1 (diff) | |
download | build_soong-00269f23ee1c2d03d7fa88aada4911f7da25f531.tar.gz build_soong-00269f23ee1c2d03d7fa88aada4911f7da25f531.tar.bz2 build_soong-00269f23ee1c2d03d7fa88aada4911f7da25f531.zip |
Fix install location for vendor tests
These should be install in /data/nativetest* with the rest of the tests,
but had been moved to /vendor/nativetest* accidentally. Add some tests
so that this doesn't happen again.
Bug: 63393698
Test: m -j blueprint_tools
Test: compare out/soong/Android-aosp_arm64.mk
Test: compare out/soong/build.ninja
Change-Id: Id3b08a7e3908955df18a043a02ea576dc88086c3
Diffstat (limited to 'android/config.go')
-rw-r--r-- | android/config.go | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/android/config.go b/android/config.go index 1f29d942..dbb9fa41 100644 --- a/android/config.go +++ b/android/config.go @@ -88,8 +88,7 @@ type config struct { } type deviceConfig struct { - config *config - targets []Arch + config *config OncePer } @@ -167,9 +166,18 @@ func saveToConfigFile(config jsonConfigurable, filename string) error { // TestConfig returns a Config object suitable for using for tests func TestConfig(buildDir string) Config { - return Config{&config{ + config := &config{ + ProductVariables: productVariables{ + DeviceName: stringPtr("test_device"), + }, + buildDir: buildDir, - }} + } + config.deviceConfig = &deviceConfig{ + config: config, + } + + return Config{config} } // New creates a new Config object. The srcDir argument specifies the path to @@ -182,16 +190,12 @@ func NewConfig(srcDir, buildDir string) (Config, error) { srcDir: srcDir, buildDir: buildDir, - - deviceConfig: &deviceConfig{}, } - deviceConfig := &deviceConfig{ + config.deviceConfig = &deviceConfig{ config: config, } - config.deviceConfig = deviceConfig - // Sanity check the build and source directories. This won't catch strange // configurations with symlinks, but at least checks the obvious cases. absBuildDir, err := filepath.Abs(buildDir) |