Merge "Pass auto_gen_config setting in Android.bp to makefile"

This commit is contained in:
Dan Shi 2020-01-07 06:23:04 +00:00 committed by Gerrit Code Review
commit 13f30ae38c
4 changed files with 16 additions and 0 deletions

View File

@ -284,6 +284,9 @@ func (benchmark *benchmarkDecorator) AndroidMk(ctx AndroidMkContext, ret *androi
fmt.Fprintln(w, "LOCAL_FULL_TEST_CONFIG :=", benchmark.testConfig.String())
}
fmt.Fprintln(w, "LOCAL_NATIVE_BENCHMARK := true")
if !BoolDefault(benchmark.Properties.Auto_gen_config, true) {
fmt.Fprintln(w, "LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG := true")
}
})
androidMkWriteTestData(benchmark.data, ctx, ret)
@ -304,6 +307,9 @@ func (test *testBinary) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkDa
if test.testConfig != nil {
fmt.Fprintln(w, "LOCAL_FULL_TEST_CONFIG :=", test.testConfig.String())
}
if !BoolDefault(test.Properties.Auto_gen_config, true) {
fmt.Fprintln(w, "LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG := true")
}
})
androidMkWriteTestData(test.data, ctx, ret)

View File

@ -141,6 +141,9 @@ func (j *Test) AndroidMkEntries() []android.AndroidMkEntries {
entries.SetPath("LOCAL_FULL_TEST_CONFIG", j.testConfig)
}
androidMkWriteTestData(j.data, entries)
if !BoolDefault(j.testProperties.Auto_gen_config, true) {
entries.SetString("LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG", "true")
}
})
return entriesList

View File

@ -76,6 +76,10 @@ func (p *testDecorator) AndroidMk(base *Module, ret *android.AndroidMkData) {
p.testConfig.String())
}
}
if !BoolDefault(p.binaryProperties.Auto_gen_config, true) {
fmt.Fprintln(w, "LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG := true")
}
})
base.subAndroidMk(ret, p.binaryDecorator.pythonInstaller)
}

View File

@ -99,6 +99,9 @@ func (test *testDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidM
if test.testConfig != nil {
fmt.Fprintln(w, "LOCAL_FULL_TEST_CONFIG :=", test.testConfig.String())
}
if !BoolDefault(test.Properties.Auto_gen_config, true) {
fmt.Fprintln(w, "LOCAL_DISABLE_AUTO_GENERATE_TEST_CONFIG := true")
}
})
// TODO(chh): add test data with androidMkWriteTestData(test.data, ctx, ret)
}