diff options
author | Yohann Roussel <yroussel@google.com> | 2017-05-04 12:12:03 +0200 |
---|---|---|
committer | Yohann Roussel <yroussel@google.com> | 2017-08-04 16:23:39 +0000 |
commit | cd1fc0502142e96f5c98402c587f6c5912c59e50 (patch) | |
tree | e41bccb3cfc78028a6035076651fa7accb9fc58e | |
parent | b1a798dfe8c660c0ee876bd1a4e19089b926ac3b (diff) | |
download | dalvik-cd1fc0502142e96f5c98402c587f6c5912c59e50.tar.gz |
Keep InstrumentationTestCase in main dex
They must be in main dex or InstrumentationTestRunner won't find them.
Bug: 31383194
Bug: 62286076
Test: frameworks/base/core/tests/hosttests/test-apps/MultiDex*
(cherry picked from commit 19c0e1011c260da8c6de1f6b104f77794dd09e40)
Change-Id: Id31d920bd9e504dfc56f6d043256deb85d8ab82e
-rw-r--r-- | dx/etc/mainDexClasses.rules | 5 | ||||
-rw-r--r-- | dx/shrinkedAndroid.proguard.flags | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/dx/etc/mainDexClasses.rules b/dx/etc/mainDexClasses.rules index a1ca9318f..0cd384244 100644 --- a/dx/etc/mainDexClasses.rules +++ b/dx/etc/mainDexClasses.rules @@ -13,3 +13,8 @@ -keep public class * extends java.lang.annotation.Annotation {
*;
}
+# Keep old fashion tests in the main dex or they'll be silently ignored by InstrumentationTestRunner
+ -keep public class * extends android.test.InstrumentationTestCase {
+ <init>();
+ }
+
diff --git a/dx/shrinkedAndroid.proguard.flags b/dx/shrinkedAndroid.proguard.flags index d72bb18a3..c22ec926c 100644 --- a/dx/shrinkedAndroid.proguard.flags +++ b/dx/shrinkedAndroid.proguard.flags @@ -19,4 +19,6 @@ } -keep public class java.lang.annotation.Annotation { } +-keep public class * extends android.test.InstrumentationTestCase { +} |