aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2019-01-05 22:30:13 -0800
committerColin Cross <ccross@android.com>2019-01-06 08:50:32 -0800
commite302687ea453099e7b61bf7dc585f10ea6ae97eb (patch)
treedf278dca8f291ed296c4120ef279e21d000aff22
parent638149e6500288142c346920615066df40c856eb (diff)
downloadbuild_soong-e302687ea453099e7b61bf7dc585f10ea6ae97eb.tar.gz
build_soong-e302687ea453099e7b61bf7dc585f10ea6ae97eb.tar.bz2
build_soong-e302687ea453099e7b61bf7dc585f10ea6ae97eb.zip
Don't dexpreopt or strip java_test modules
I6bb2c971cee65d2338839753aa0d84939f335b1b accidentally caused java_test modules to be dexpreopted and possibly stripped. Test: dexpreopt_test.go Change-Id: Ida8f046c509c97e38bd3bce66944d32f01530db4
-rw-r--r--java/dexpreopt_test.go9
-rw-r--r--java/java.go1
2 files changed, 10 insertions, 0 deletions
diff --git a/java/dexpreopt_test.go b/java/dexpreopt_test.go
index 5b557998..e4c80dde 100644
--- a/java/dexpreopt_test.go
+++ b/java/dexpreopt_test.go
@@ -83,6 +83,15 @@ func TestDexpreoptEnabled(t *testing.T) {
enabled: false,
},
{
+ name: "java test",
+ bp: `
+ java_test {
+ name: "foo",
+ srcs: ["a.java"],
+ }`,
+ enabled: false,
+ },
+ {
name: "android test",
bp: `
android_test {
diff --git a/java/java.go b/java/java.go
index c02ccd34..12e724e7 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1601,6 +1601,7 @@ func TestFactory() android.Module {
&module.testProperties)
module.Module.properties.Installable = proptools.BoolPtr(true)
+ module.Module.dexpreopter.isTest = true
InitJavaModule(module, android.HostAndDeviceSupported)
return module