summaryrefslogtreecommitdiff
path: root/java/testing.go
AgeCommit message (Collapse)Author
2020-06-08java_sdk_library: Add system-server scope Paul Duffin
Bug: 155164730 Test: m nothing Change-Id: I49a2dab5c064b05f16691a3fae65f2b4ffc53bfd
2020-06-08Split the core/platform API into stable and legacy versions. Pete Gillin
For now, everything outside libcore still uses the legacy version. Test: treehugger Bug: 157640067 Change-Id: If5234e9ee533ff537926801a0af045d36b1caf01
2020-06-01Add android.test.base to class loader context for API version < 30. Ulya Trafimovich
Test: lunch aosp_cf_x86_phone-userdebug && m Change-Id: Id2ece4b2a6317998e1dd177e853848cc3956f39f
2020-05-25Revert "Default annotations_enabled to true for sdk_library" Anton Hansson
This reverts commit a9a3173ee34ce6a6d33677eda02a6ca9b216e87e. Bug: 157010342 Reason for revert: broke ike Exempt-From-Owner-Approval: clean revert Change-Id: I592f50d0263ce78ea6d0d335cc7e0f493fcff800
2020-05-21Default annotations_enabled to true for sdk_library Anton Hansson
This turns out retention of Nullable annotations, which is almost certainly what every user wants. Also add the "stub-annotations" lib to the stub libs property, to make sure the nullability annotations resolve properly. Bug: 157010342 Test: m Change-Id: I905144add4ef6f85445eedd1ba5169445f6005e0
2020-05-18Merge "Use system modules for prebuilt SDKs >=30" Colin Cross
2020-05-15Use system modules for prebuilt SDKs >=30 Colin Cross
Prebuilt SDKs >=30 now contain core-for-system-modules.jar, convert them to system modules and use them when compiling against the SDK to allow using javac -source 1.9 -target 1.9. Bug: 117069453 Test: TestClasspath Change-Id: Iebadad5980b952ed91c3ffd56cff1ce1827d3247 Merged-In: Iebadad5980b952ed91c3ffd56cff1ce1827d3247
2020-05-15Merge "Use system modules for prebuilt SDKs >=30" into rvc-dev TreeHugger Robot
2020-05-15Implement android_app_set module Sasha Smundak
Bug: 152319766 Test: manual and builtin Change-Id: Id0877476f9ae23311d92c0b59a9c568140ab4119 Merged-In: Id0877476f9ae23311d92c0b59a9c568140ab4119
2020-05-14Use system modules for prebuilt SDKs >=30 Colin Cross
Prebuilt SDKs >=30 now contain core-for-system-modules.jar, convert them to system modules and use them when compiling against the SDK to allow using javac -source 1.9 -target 1.9. Bug: 117069453 Test: TestClasspath Change-Id: Iebadad5980b952ed91c3ffd56cff1ce1827d3247
2020-05-14Implement android_app_set module Sasha Smundak
Bug: 152319766 Test: manual and builtin Change-Id: Id0877476f9ae23311d92c0b59a9c568140ab4119
2020-05-13Add signing certificate lineage support to soong Liz Kammer
(This is a cherry pick.) Test: app_test Bug: 153366049 Merged-In: I65a92d6c40057dcc01950991fb7be485de1c9080 Change-Id: I65a92d6c40057dcc01950991fb7be485de1c9080
2020-05-08Add signing certificate lineage support to soong Liz Kammer
Test: app_test Bug: 153366049 Change-Id: I65a92d6c40057dcc01950991fb7be485de1c9080
2020-03-25Merge "Make system_server stubs consistent with other stubs" Anton Hansson
2020-03-25Make system_server stubs consistent with other stubs Anton Hansson
Include the module_api stubs in system_server one instead of putting both of these jars on the classpath. Also rename it to be in line with the other stubs. Bug: 149293194 Test: m Exempt-From-Owner-Approval: approved internally Change-Id: Iead5af4152a49cd59a4fd7afc0312c2f0c872c1e Merged-In: Iead5af4152a49cd59a4fd7afc0312c2f0c872c1e (cherry picked from commit bbd78556daf4a7e015f2e3ddfe9539909e9ebf40)
2020-03-24add aidl.export_include_dirs to java_import module type Jiyong Park
This allows a java prebuilt to export AIDL files to its clients. Bug: 151933053 Test: m Change-Id: I21b5d5ce647141a7c76f62490adbccb858b10323
2020-03-19Make system_server stubs consistent with other stubs Anton Hansson
Include the module_api stubs in system_server one instead of putting both of these jars on the classpath. Also rename it to be in line with the other stubs. Bug: 149293194 Test: m Change-Id: Iead5af4152a49cd59a4fd7afc0312c2f0c872c1e
2020-02-19Move NDK test modules into cc/testing.go Colin Cross
Move the NDK modules defined in app_test.go into cc/testing.go in preparation for using sdk_version: "current" in more tests. Test: all soong tests Change-Id: I80bc31225fb4562fce42781219cefbbd6affae06
2020-02-12sdk_version: "system_server_current" Jiyong Park
The new sdk version "system_server_current" is for system server components that needs to use all public APIs, system APIs, module APIs, and the system server APIs. Bug: 146757305 Test: m Change-Id: I24fd5af010532a110393676607dc90889f2ec17e
2020-02-06Merge "sdk_version: "module_current" is supported" Treehugger Robot
2020-02-05Merge "Add rules to handle asset resources." Jaewoong Jung
2020-02-04java_sdk_library use prebuilt jars for numeric sdk_version Paul Duffin
Previously, when a library that used a numeric sdk version also referenced a java_sdk_library it would use the current version of its API. That was dangerous as there is an expectation that an app building against a numbered version will also be targeted at that version and so building against a later version of the API could hide runtime incompatibilities. This change will use prebuilt versions of the java_sdk_library's api when being built for a numbered sdk version. Bug: 148080325 Test: m droid Change-Id: I3fd416553950785a443c1702e495a96debc33331
2020-02-03java_sdk_library_import - expose system and test stubs Paul Duffin
Previously, the java_sdk_library_import only exposed the public stubs. This change adds support for exposing system and test stubs too by adding separate structures for public, system and test scopes. The existing properties are kept for legacy reasons (and because libs can be common across the differents scopes). It extracts some code that is common to both sdk library and sdk library import. The legacy support will be removed in a future change once all existing usages have been switched over. Bug: 148080325 Test: m droid TARGET_BUILD_APPS=Camera2 m Change-Id: I0b26cc8af9ee044437ff3b80c1eca611816b9386
2020-01-31sdk_version: "module_current" is supported Jiyong Park
module_* is a new API surface for OS modules (e.g. APEXes). It has slightly bigger API surface than the system_* SDK. Specifically, APIs with @SystemApi(client=MODULE_LIBRARIES) are added there. Bug: 146757305 Test: m Change-Id: I8980e50c0e3a4cd843048e0de1f638e854384f46
2020-01-16Add rules to handle asset resources. Jaewoong Jung
AAPT2 ignores assets in overlay resource inputs, so separate rules are required to extract and merge assets from dependencies. Test: app_test.go Test: Added assets to Settings-core for testing Test: Confirmed Settings.apk contains them with this change. Fixes: 146655310 Change-Id: Iab8bc61b719541dae64f0e3502bc9cb45a353687
2020-01-03Remove unused system_modules Jiyong Park
With https://android-review.googlesource.com/c/platform/build/soong/+/1145829, android_*stubs_current_system_modules are no longer used. Thus removing. Bug: 142896162 Test: m checkbuild Change-Id: Icb8ea48f9bdb73f780cd9bdacf4c111ca7b7cd9e
2019-12-31Add support for java_test in sdk Paul Duffin
Adds java_test_import module type for use by the sdk snapshot and adds java_tests property to the sdk and sdk_snapshot module type. This is needed for the conscrypt test sdk. Bug: 143678475 Test: m nothing Change-Id: Ied4c56c978dac2f92a9b3bc34b3235d7eeba2fd3
2019-12-19Merge "Add updatable_media_stub to framework" Jiyong Park
2019-12-19Add updatable_media_stub to framework Jiyong Park
The module framework is now a build-only library whose purpose is to provide hidden APIs from the non-updatable part of the platform and APIs from the modules. Merging updatable_media_stub to framework, like the stub libraries from other modules. As a result, updatable_media_stub can be removed from DefaultLibraries. Bug: N/A Test: m Exempt-From-Owner-Approval: cherry-pick from internal Merged-In: I7f80716119ad6ac627e5666def9fe17112dcde3b (cherry picked from commit 4c258d282b15bd0d9ba3de8dfa9762de1bd1adf4) Change-Id: I7f80716119ad6ac627e5666def9fe17112dcde3b
2019-12-18Move filesystem into Config Colin Cross
The filesystem object was available through ModuleContext.Fs(), but gives too much access to the filesystem without enforicing correct dependencies. In order to support sandboxing the soong_build process move the filesystem into the Config. The next change will make it private. Bug: 146437378 Test: all Soong tests Change-Id: I5d3ae9108f120fd335b21efd612aefa078378813
2019-09-27Remove unused core-system-modules Paul Duffin
Soong tests no longer need to define a dummy version of this. Test: m checkbuild Bug: 141613583 Change-Id: Iad12560aedc74a499808bd52d9ea09ab0d68d743
2019-09-20Add custom SystemModules to bootclasspath to reduce duplication Paul Duffin
Adds a library dependency to each of the dummy system modules created by testing.go so that any changes in the behavior were detected by the existing tests which were then fixed. Bug: 141359858 Test: m checkbuild Change-Id: Id4442f4aa3931ac93049f3367b96a5b49cc075e1
2019-06-17Merge changes I42cb181f,I6413c9b1 am: 33ee25466f Paul Duffin
am: 00c2bbb0e7 Change-Id: Icca90608b256e726a9a1bd79e9cedca1a6b53f84
2019-06-17Add sdk_version:"core_platform" to replace no_framework_libs:true Paul Duffin
Where possible this duplicates any tests that use no_framework_libs:true with ones that use sdk_version:"core_platform". If not possible (e.g. in the default targets included in java/testing.go) it switches some to use sdk_version:"core_platform" to ensure that there is no regression in the behavior of no_framework_libs:true. Follow up changes will switch all usages of no_framework_libs:true over to use sdk_version:"core_platform" at which point no_framework_libs will be removed. Bug: 134566750 Test: m droid Change-Id: I42cb181f628b723c8f32a158ae4752b4c83365ae
2019-06-17Remove the no_standard_libs property Paul Duffin
Corrects an error message that refers to no_standard_libs. Removes any tests that use no_standard_libs:true where possible as there are duplicate tests for sdk_version:"none". Otherwise, switches them over to use sdk_version:"none". The androidmk mapping from LOCAL_NO_STANDARD_LIBRARIES to no_standard_libs has also been removed. There was little point in updating the tool to map it through to sdk_version:"none" as there are only a couple of places where it is used, in art's test running mk targets and in some unbundled packages to work around some limitation in .mk based build. Bug: 134566750 Test: m droid Change-Id: I6413c9b1fe3e63b93753a6a017d2981e32b7e013
2019-06-14Merge "Add sdk_version:"none" to replace no_standard_libs:true" am: b11c72b0b8 Paul Duffin
am: e34bbae1ca Change-Id: I9465a810dad7f3ea95b6c883844358d817f8cc8e
2019-06-13Add sdk_version:"none" to replace no_standard_libs:true Paul 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-12Remove unnecessary use of sdk_version: "core_current" am: b826a2f269 Paul Duffin
am: 9ec3254d13 Change-Id: I616493b78c283976a5eee06a304e8aaa5050d0fc
2019-06-12Remove unnecessary use of sdk_version: "core_current" Paul Duffin
Modules that specify no_standard_libs: true should not specify the sdk_version property as well because the former supercedes the latter. Bug: 134566750 Test: m Change-Id: I1d8663dc3a25baf23a1b136c7f35cf130cd7543b
2019-06-06Merge "Use correct system_modules with core.current.stubs" am: 6d376a0de8 Neil Fuller
am: c9d38ec5e0 Change-Id: Id00fd788879e6fc5f5146925161d10d2a1989ab9
2019-06-06Use correct system_modules with core.current.stubs Neil Fuller
The system_modules defn used with core.current.stubs was core-system-modules which doesn't match. Instead, this change uses core-current-stubs-system-modules. Test: build Change-Id: Ifb9e77b02bbb04c1cb39c6b9f97932c20d44d8ba
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 Soong Colin 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: 2f4c55e9f7 Colin Cross
am: 3c8e809052 Change-Id: I9bd1e0d745c605b3617576f9a6044527421fbfe4
2019-05-28Port uses-shared library verification and dexpreopting to Soong Colin 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-21Merge "Add kotlin-stdlib-jdk8 when using Kotlin" am: 6be6c2e4c5 Colin Cross
am: 10077730ed Change-Id: I8199cfe2fa1ea8305774357b65115a288f3446d9
2019-05-15Add kotlin-stdlib-jdk8 when using Kotlin Colin Cross
kotlin-stdlib-jdk8 contains extensions to the Kotlin standard library for use when targeting Java language level 8. Test: m checkbuild Change-Id: Iac5f977f9080d8e0e2402b08a992a93c909744e9
2019-04-21Merge "Build framework.aidl in Soong" am: 8bf9bd9f91 Colin Cross
am: 2e2967423a Change-Id: I177c278e520177929aeb76fc1ce6f05ebc576a20