summaryrefslogtreecommitdiff
path: root/java/java_test.go
AgeCommit message (Collapse)Author
2019-06-14Merge "Add sdk_version:"none" to replace no_standard_libs:true" am: b11c72b0b8Paul Duffin
am: e34bbae1ca Change-Id: I9465a810dad7f3ea95b6c883844358d817f8cc8e
2019-06-13Add sdk_version:"none" to replace no_standard_libs:truePaul Duffin
Where possible this duplicates any tests that use no_standard_libs:true with ones that use sdk_version:"none". If not possible (e.g. in the default targets included in java/testing.go) it switches some to use sdk_version:"none" to ensure that there is no regression in the behavior of no_standard_libs:true. Follow up changes will switch all usages of no_standard_libs:true over to use sdk_version:"none" at which point no_standard_libs will be removed. Bug: 134566750 Test: m droid Change-Id: I5f0fd3daa980f6b223abe454cba7f25a97a39d7a
2019-06-13Merge "Allow java_test.go tests to use any Android.bp file" am: 45656aacabPaul Duffin
am: e6cb60da57 Change-Id: I0fedcef906e6e59e004115d421df1a152348a02c
2019-06-12Allow java_test.go tests to use any Android.bp filePaul Duffin
Previously, the tests had to use the Android.bp file in the root directory of the mock file system. That prevented adding tests that are dependent on the location of the Android.bp file, e.g. ones that use no_standard_libs. This change will process any Android.bp in the mock filesystem. Bug: 134566750 Test: m Change-Id: I6fb057a473a18e87bd1a89507e78ceb3fd171eb5
2019-06-05Merge "android_app stl property bug fix" am: 4f67c42d76Jaewoong Jung
am: 58d0f0cf69 Change-Id: Ic14f463f27b8413e0d4960658c41407763d79ba6
2019-06-04android_app stl property bug fixJaewoong Jung
When it is set to c++_shared, the added dependency should be libc++_shared, not libc++. Fixes: 130891985 Test: app_test.go, atest 'CtsNdkBinderTestCases' w/ conversion CL Change-Id: I0e50e0d5bf511aa6e52d16cd715a185721011255
2019-05-30Merge "Port uses-shared library verification and dexpreopting to Soong" am: ↵Colin Cross
7a1fefc2de am: 38ec6cfbf4 Change-Id: Ib9bbb720605f418d242aba98df9d9904671c29e4
2019-05-29Port uses-shared library verification and dexpreopting to SoongColin Cross
Ports 09f3b97f4b488cd3a7b7d72038b173575b02c162 (Add support for preopt with uses-libraries) from Make to Soong to support verifying and preopting shared libraries. This reapplies Id25f55f07a55120bebe2a9b32c094209efc85c8b with fixes for unbundled builds and builds with ALLOW_MISSING_DEPENDENCIES=true set. Bug: 132357300 Test: app_test.go Test: m checkbuild Change-Id: I964309a68ec4ed081f3f3154879c71048ecb5455
2019-05-29Merge "Revert "Port uses-shared library verification and dexpreopting to ↵Colin Cross
Soong"" am: 7d06395f0c am: cc50c0c4de Change-Id: I4e12ee0f7d2dbb293e492c55f2eae66dc9638266
2019-05-29Revert "Port uses-shared library verification and dexpreopting to Soong"Colin Cross
This reverts commit b66d7b1c20f7e54a5920780ba6643e971d216d31. Reason for revert: broke unbundled builds Change-Id: I96ae287885107079de4a26e6b100ad8ed66961c0
2019-05-29Merge changes from topic "verify_uses_libraries" am: 2f4c55e9f7Colin Cross
am: 3c8e809052 Change-Id: I9bd1e0d745c605b3617576f9a6044527421fbfe4
2019-05-28Port uses-shared library verification and dexpreopting to SoongColin Cross
Ports 09f3b97f4b488cd3a7b7d72038b173575b02c162 (Add support for preopt with uses-libraries) from Make to Soong to support verifying and preopting shared libraries. Bug: 132357300 Test: app_test.go Test: m checkbuild Change-Id: Id25f55f07a55120bebe2a9b32c094209efc85c8b
2019-05-16Merge "Fix override_android_app dependency issues." am: 105920a792Jaewoong Jung
am: ac5ee3559f Change-Id: Ie6447241cc069f507d053e10d78ba540d9cc84f9
2019-05-15Fix override_android_app dependency issues.Jaewoong Jung
This change fixes an issue where an android_test could not depened on an override_android_app or an android_app overridden by one by moving all override processing to post-deps and forwarding incoming dependencies on override_android_apps to base android_app modules Fixes: 132447700 Test: app_test.go Change-Id: I4ac593be661f541f5ea9823ef97373bee4b186f9
2019-05-10Merge "Rename EXPERIMENTAL_USE_OPENJDK9 to ↵Pete Gillin
EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9." am: 42e862c56d am: 350f0987bf Change-Id: Ibfc75aa4c4356d86cf7ce80becff0cf92cf98e14
2019-05-10Merge "Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9."Pete Gillin
2019-05-09Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9.Pete Gillin
The current EXPERIMENTAL_USE_OPENJDK9 environment variable is a legacy from when the 8 -> 9 toolchain upgrade was happening. That migration is done and the variable only affects the language level, so it should have a name that reflects that. (The current situation would be especially confusing if we started a 9 -> 11 toolchain upgrade, presumably controlled by a variable like EXPERIMENTAL_USE_OPENJDK11, since the two settings look incompatible but are actually orthogonal.) The current variable historically allowed a value or "1.8" which meant "use the OpenJDK 9 toolchain but target language level 8". That value no longer has any meaning and the new variable doesn't allow it. Bug: 131678633 Test: `make` with `EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true` Test: `javap -v $OUT_DIR/soong/.intermediates/libcore/core-oj/android_common/javac/classes/java/util/List.class | grep 'major version'` shows 53 Test: Audit all mentions of the old string here and downstream Change-Id: Idad808c7f07913baba1a777627322d5452dabcef
2019-05-08Merge "Implement DPI variants in android_app_import." am: 53ad63c127Jaewoong Jung
am: a64eb7eada Change-Id: Idcfca3ed5cbeb4955958d007ef701939cd3f26ae
2019-05-08Merge "Implement DPI variants in android_app_import."Jaewoong Jung
2019-05-07Implement DPI variants in android_app_import.Jaewoong Jung
Bug: 128610294 Test: app_test.go Change-Id: Ie3e558bfdb40de6b0b9df95d3b373d08a4084d7b
2019-05-07Merge "Track sources for srcjars across modules" am: 082640d6eeColin Cross
am: 222f5ee5f2 Change-Id: I1787ef4d66ebd129a15536b1455139235613ce2c
2019-05-06Track sources for srcjars across modulesColin Cross
Robolectric coverage needs a srcjar that sometimes needs to include sources of dependencies. Track the arguments and dependencies necessary to jar the sources. Test: TestIncludeSrcs Change-Id: I9979d2b8350923a2237e743c232e6e548f54ba3b
2019-05-02Merge "Add android_app_import." am: e7d52c779fJaewoong Jung
am: 5fa44dfb04 Change-Id: I1ec1d30fe592f1997f41eb66f1ad85d9b2b4abeb
2019-05-01Add android_app_import.Jaewoong Jung
This is an initial version that handles the most basic cases. Bug: 128610294 Test: app_test.go + prebuilt webview.apk Change-Id: Ic525559aad5612987e50aa75b326b77b23acb716
2019-04-21Merge "Build framework.aidl in Soong" am: 8bf9bd9f91Colin Cross
am: 2e2967423a Change-Id: I177c278e520177929aeb76fc1ce6f05ebc576a20
2019-04-21Merge "Build framework.aidl in Soong"Colin Cross
2019-04-19Merge "Fix handling optimize.enabled from java_defaults" am: 36ab727c82Sasha Smundak
am: 2f65feddde Change-Id: I9ba47791f33c2722140dcfa3ddfe2b649ee3d9bd
2019-04-18Build framework.aidl in SoongColin Cross
Move the rules to build framework.aidl into Soong, and use it when compiling aidl files with sdk_version: "current". Also fixes incorrectly using the aidl includes exported by the "framework" module when the proguardRaiseDep dependency was added. Bug: 130798034 Test: sdk_test.go Change-Id: I126adf1d9e7b6acb528875ff62b974ba7ad9a337
2019-04-17Fix handling optimize.enabled from java_defaultsSasha Smundak
Some module types (`android_test`, etc.) set `optimize.enabled` by default. If such module happens to have `defaults` attribute which clears `optimize.enabled`, the latter value is ignored. Fixes: 129858282 Test: unit tests in java_test.go, `atest CtsExtendedMockingTestCases` succeeds with aog/936802 reverted (that is, with cts/test/mocking converted to Android.bp) Change-Id: Ib8e3a0ab0bd489d70ed07f626082aeae31c45e7c
2019-04-17Add support for prebuilt java_sdk_library modules am: 79c7c26d8aColin Cross
am: c1afb65520 Change-Id: Ia26c7f53332a4821218476d6c796f7ab39928b87
2019-04-17Add support for prebuilt java_sdk_library modulesColin Cross
Add java_sdk_library_import for use when a java_sdk_library may be used by unbundled branches that do not have the project that contains the original java_sdk_library module. Bug: 130287656 Test: m checkbuild Change-Id: I62df4bccc0da95ed6c8b31dab8f2c32cc3215e9e
2019-04-17Merge "Use LoadHook to create modules in java_sdk_library" am: 59d4a31063Colin Cross
am: 414d337702 Change-Id: Ide9449f45066883662d05946fbbd43b142ec208f
2019-04-16Use LoadHook to create modules in java_sdk_libraryColin Cross
Creating new modules in a mutator is dangerous, as other mutators that need to see the new modules may already have run, in this case the prebuilts mutator. Move SdkLibraryMutator to a LoadHook instead. Also moves registering the LoadHook mutator to testing.go so it is registered for all tests. Test: m checkbuild Change-Id: I08bd76a0e6205d2ca27861058067a1562c339eed
2019-04-10Stop using build/target -> build/make/target symlink am: 412160e1c9Dan Willemsen
am: 8862c76a68 Change-Id: I0dacd807818a58934d436724401335f2c8366c37
2019-04-09Stop using build/target -> build/make/target symlinkDan Willemsen
Instead, fully specify build/make/target/... everywhere Test: treehugger Change-Id: I07ba0e9b0604919a271afd5133070616e1f404fc
2019-04-03Merge "Fix sdk_version: "system_current" when Platform_sdk_final=true" am: ↵Colin Cross
b007b2bde5 am: 8c3f398c6c am: 209edee425 Change-Id: I54ea846c9ac2b29354109755225db71dcdaa1527
2019-04-02Fix sdk_version: "system_current" when Platform_sdk_final=trueColin Cross
When PLATFORM_VERSION_CODENAME is set to REL Platform_sdk_final becomes true, which causes the return value of sdkVersionToNumber for "system_current" to a real version number instead of FutureApiLevel. This enables the check against PlatformSystemSdkVersions, which doesn't contain "current". Use the numeric value instead. Fixes: 129786845 Test: sdk_test.go Change-Id: If7cf211cc01c5fbf3e3ece3c3f604718a13d5a9b
2019-03-27Merge "Always package JNI libs into android_test modules" am: eae12cf400 am: ↵Colin Cross
f394fb0a27 am: b1af785608 Change-Id: I73d8243ae1bd428098f4f60b4a22c9b50785c481
2019-03-27Always package JNI libs into android_test modulesColin Cross
android_test modules should always have native libraries packaged into the APK even when use_embedded_native_libs: false is set. Fixes: 129298278 Test: TestJNIPackaging Change-Id: Idfcc630f7c6579c1280a920b5d71808b0a502e06
2019-03-22Merge "Add override_android_app module type." am: e9665723da am: 9874d6abe6Jaewoong Jung
am: c3432e294e Change-Id: I28638a23c6140ae1775187a2afc61b15db97f487
2019-03-21Add override_android_app module type.Jaewoong Jung
This is a new implementation of overriding module types that makes use of local variants. With this, product owners can use PRODUCT_PACKAGES to decide which override module to include in their products. Bug: 122957760 Bug: 123640028 Test: app_test.go Change-Id: Ie65e97f615d006b6e9475193b6017ea9d97e8e97
2019-03-20Add dex_import module type am: 42be761ebd am: 66f3f2a01aColin Cross
am: 5d56651745 Change-Id: I6a96468ef78f5cd0c1fab335e691bcc19a8988dd
2019-03-20Add dex_import module typeColin Cross
Add a module type for importing a prebuilt jar that contains classes.dex files. Test: m with a prebuilt jar that contains classes.dex files in PRODUCT_BOOT_JARS Test: java_test.go, dexpreopt_test.go, dexpreopt_bootjars_test.go Bug: 124804356 Bug: 125517186 Change-Id: I496848f9dca11f758d49b1cb68168cec7f8e1718
2019-03-05Merge "Add modules for converting java modules between host and device" am: ↵Colin Cross
e3ad4144db am: d5f25c7685 am: 3ce8fedd9a Change-Id: I09f01ae076b93cdec5b738eed00c2d7a40e5555d
2019-03-05Add modules for converting java modules between host and deviceColin Cross
java_device_for_host and java_host_for_device allow treating a device module as a host module and vice versa. They will be useful for converting layoutlib and robolectric to Soong, as these modules run device java code on the host. Bug: 117920228 Test: device_host_converter_test.go Change-Id: Ia9a371fb41a97bc16338097f3ce8b40099744167
2019-03-04Move some java test setup later am: c28bb0b8f9 am: 7e2b9c48caColin Cross
am: 7cb6f9e601 Change-Id: Ib0924d35bc9cd844a071e5f8729f5e2f7b8b6745
2019-03-05Move some java test setup laterColin Cross
Move ctx.Register() from testContext() to run() so that tests can register more singletons before the env singleton is registered. Any singletons registered after the env singleton will hit an error if they attempt to read an environment variable. Move setDexpreoptTestGlobalConfig from TestConfig to run() so that a test can set their own custom config after TestConfig but before run(). Test: All Soong tests Change-Id: Iec47f4b7898736f583cbd6bd53e4d02a035f4fb2
2019-02-28Merge "Revert "Add override_module."" am: ef36053829 am: 4ab2e63974Jaewoong Jung
am: d26cc522ac Change-Id: Iab70e8d689eea96831afd4f3b696122b98c99d9b
2019-02-28Revert "Add override_module."Jaewoong Jung
This reverts commit aa65e17016152d0d73cd10ab3987bc3bd5c2ef91. Reason for revert: Not compatible with PRODUCT_PACKAGES, and so has very limited use. Change-Id: Ib141d3984a6f12bb50989e66037494c466b066f1
2019-02-27Merge "Add override_module." am: b709575a75 am: e8eaf4608dJaewoong Jung
am: b44bb0896b Change-Id: I4c8faef56835a1e7d334f8dade5623c9ea07df3e