aboutsummaryrefslogtreecommitdiff
path: root/dexmaker
AgeCommit message (Collapse)Author
2022-09-26Revert^2 "Update to upstream dexmaker"John Wu
Cherry-pick "Do not read Build.VERSION to allow non-standard Android distributions (Ia8c4ba4c82cd6f193c565f1bfe48faffc4aac08f)" to fix ART host tests. 783d1254b1698492fd8ae7e04a20115d1283ba60 Change-Id: Iec6a60d0016f50101fe9151931065dc04148c767
2022-09-15Revert "Update to upstream dexmaker"Hans Boehm
Revert "Update CTS tests" Revert "Enforce files loaded in DexFile to be read-only" Revert "Enforce files loaded in DexFile to be read-only" Revert submission 2086507-ro_java_dcl Reason for revert: Causes ART host tests to fail. Reverted Changes: I736ccfb6d:Update CTS tests Ie081df900:Update to upstream dexmaker Id635fbc79:Enforce files loaded in DexFile to be read-only I700af94d4:Enforce files loaded in DexFile to be read-only Change-Id: I459aeb8ec63836200dd68596a5adbb5c4d9a56b5
2022-09-12Update to upstream dexmakerJohn Wu
New changes are submitted upstream to support latest Java DCL restrictions added to the platform. Test: m Bug: 218865702 Change-Id: Ie081df9004c01d9e4e1bcefba22cce3d92f49d4a
2020-01-27guessPath not to depend on the first level of app directorySongchun Fan
We are updating apps' apk path to have a two-level structure. Default apk path of an installed app: Before: /data/app/[packageName]-[randomString]/base.apk After: /data/app/[randomStringA]/[packageName]-[randomStringB]/base.apk This CL fixes the path guessing assumption the apk dir is only one level below the /data/app dir. Test: atest DexmakerTests BUG: 148237378 Change-Id: I66f1d7036949c2f05e6d37bc270d47f8e77e51c1
2018-12-05Update dexmaker to latest master (8ff85edb2793cc1e0f6a93c67b127cb9c43d924e)Philip P. Moltmann
Test: atest CtsMockingTestCases CtsInlineMockingTestCases CtsMockingDebuggableTestCases CtsExtendedMockingTestCases Fixes: 120048950 Change-Id: Iddd7d3d71d3aa4cead1699d64481cff2f73abfbd
2018-11-06Update dexmaker to pull in latest fixesPhilip P. Moltmann
Test: atest CtsMockingTestCases CtsInlineMockingTestCases CtsMockingDebuggableTestCases CtsExtendedMockingTestCases Fixes: 118875860 Change-Id: Ia495ef00924147a94a9640ebd1eefe02fdcece04
2018-08-28Revert "Revert "Update dexmaker on AOSP to same version as on internal master""Philip P. Moltmann
This reverts commit 0ad4f18077e9cac496e836c82ef99763bd7ce094. Reason for revert: Fix in I5094fa145fc5f6d5c5d9426b07d764c07e545819 Change-Id: I5015d35f5fd464f6f86631ecb5b45e2fbbedffab
2018-08-28Revert "Update dexmaker on AOSP to same version as on internal master"Philip P. Moltmann
This reverts commit 8708c9c6ff7ae1eef4b4e0633dd727d8794534bd. Reason for revert: Breaks errorprone build Change-Id: Ic923d241b27365bb9845d3d8dff67d485116424d
2018-08-21Update dexmaker on AOSP to same version as on internal masterPhilip P. Moltmann
Bug: 109745050 Test: atest CtsMockingTestCases CtsInlineMockingTestCases CtsMockingDebuggableTestCases CtsExtendedMockingTestCases Change-Id: I8d33026843b9721bd7f597e0f87b85ecf88bd69c Merged-In: I33c12311cb17366b936f4716c1bf89a5d2e18074
2018-05-21DO NOT MERGE: Revert "DO NOT MERGE: Revert "Allow mocks to call blackisted ↵android-9.0.0_r35android-9.0.0_r34android-9.0.0_r33android-9.0.0_r32android-9.0.0_r31android-9.0.0_r30android-9.0.0_r22android-9.0.0_r21android-9.0.0_r20android-9.0.0_r19android-9.0.0_r16android-9.0.0_r12android-9.0.0_r11pie-qpr2-releasepie-qpr1-s3-releasepie-qpr1-s2-releasepie-qpr1-s1-releasepie-qpr1-releasepie-dr1-releasepie-dr1-devpie-devPhilip P. Moltmann
APIs"" This reverts commit 8738f6764b9f61eb11ad678cad6d9434b4133731. Reason for revert: This was only a temporary revert. Now that the real issue is fixed, we can submit this again Bug: 80041014 Test: vts-tradefed run host --class com.android.tradefed.device.metric.VtsCoverageCollectorTest atest CtsActivityManagerDeviceTestCases atest CtsInputMethodTestCases Change-Id: I8d0ac45e3fe73c1870cf08f989b6d39f09923183
2018-05-21DO NOT MERGE: Revert "Allow mocks to call blackisted APIs"Philip P. Moltmann
This reverts commit 5529c6ea5fd4cb3959f11c9b4b114361a3db2f73. Bug: b/80041014 Change-Id: I01752919321eb5f7bfca8b069c3b13edb5d6ce95
2018-05-18Allow mocks to call blackisted APIsPhilip P. Moltmann
Mark the following classes as trusted: - All generated mock classes as they might directly call blacklisted super-methods - The leniant copy tool as it copies blacklisted fields - The MockMethodAdvice as it calls blacklisted super-methods via reflection Test: atest CtsInlineMockingTestCases CtsMockingTestCases CtsMockingDebuggableTestCases Fixes: 78235528 Change-Id: I374de11656ffa4a506f6c4436fcc45fe4b50af85
2018-03-15Update dexmaker to almost 2.16Philip P. Moltmann
Test: atest CtsMockingTestCases CtsInlineMockingTestCases Bug: 74344734 Change-Id: Ib79431a454b3ae9715906da61fc9267d54ae7f07
2017-12-12Update dexmaker to latest (master) statePhilip P. Moltmann
This adds dexmaker-mockito-inline support and dexmaker-mockito-*-tests. Inline mocking will allow mocking of final methods/classes. Bug: 63538681 Test: cts-tradefed run cts-dev -m CtsMockingTestCases Change-Id: Id8b88639abe0a84642273eae43322df09068a782
2017-03-21Scan for methods in extra interface hierarchyPaul Duffin
The ProxyBuilder was not traversing the interface hierarchy of the extra interfaces provided by the caller to find methods to proxy. That resulted in an AbstractMethodError when those methods were called. (cherry picked from d6b8d02d4fc7d57f0b72dba598b6320ef02a8213) Bug: 36407367 Bug: 32912773 Test: Added a failing test then fixed it, reran tests Change-Id: If68105da3b7e62383c8fa8ececc21383b299d854
2017-03-16Reapply - Hacks to allow mocking of package private classesPaul Duffin
2 things are required to allow mocking for package private classes. First is creating the mock in the same class as the base, that part is simple and seems to have no effect. The second is to have a matching ClassLoader as the source class. To make the classloader match, instead of generating a new ClassLoader, add the new dex to the existing one and share the base class's ClassLoader. Since this is a persistent change and could affect the process, it will be opt-in through setting a system property. This also appears to have unintended speedup in the tests I was testing, possible through cache fixes or brokenness. (cherry picked from commit 31b974435499d3c9769ed6a746e946187f3be64f) Test: Add System.setProperty("dexmaker.share_classloader", "true) to SysuiTestCase then runtest systemui Change-Id: I35c805ee3797ff151ac19bd0c931ebfd41d3b670
2017-03-15Update to version 2.2.0 and make it buildPaul Duffin
Updated using ./update_source.sh 2.2.0 Added lib directory to contain prebuilt versions of the dx and dex libraries to replace the contents of the dx directory which was deleted upstream. Bug: 36231644 Test: make checkbuild Change-Id: I31de03f40e4af097be01b5d9f2fe2c71ae879b54
2017-03-15Hacks to allow mocking of package private classesJason Monk
2 things are required to allow mocking for package private classes. First is creating the mock in the same class as the base, that part is simple and seems to have no effect. The second is to have a matching ClassLoader as the source class. To make the classloader match, instead of generating a new ClassLoader, add the new dex to the existing one and share the base class's ClassLoader. Since this is a persistent change and could affect the process, it will be opt-in through setting a system property. This also appears to have unintended speedup in the tests I was testing, possible through cache fixes or brokenness. Test: Add System.setProperty("dexmaker.share_classloader", "true) to SysuiTestCase then runtest systemui (cherry picked from commit 31b974435499d3c9769ed6a746e946187f3be64f) Change-Id: Ic871c5f48f5d5e38946b77de10d71ca4589c5daa Merged-In: I566ff25dcdf53fbb8a0acd087724b068120f82c6
2016-08-09Generate a test APKPaul Duffin
Generates a test APK for use by the Android Continuous Testing Platform. Ensures that the selected data directory is writable when running the APK using am instrument. Bug: 30683723 Change-Id: I8129723f2b78aaa1a41808045e0d38980e8ba206 Test: Use vogar and am instrument as described in Android.mk
2016-08-09Scan for methods in extra interface hierarchyPaul Duffin
The ProxyBuilder was not traversing the interface hierarchy of the extra interfaces provided by the caller to find methods to proxy. That resulted in an AbstractMethodError when those methods were called. Bug: 30683723 Change-Id: Iabda52975ee42d6fb78966494c56445cb3f69277 Test: Added a failing test then fixed it, reran tests
2016-08-09Revert "Revert upstream change 924bb5b1c1718ac4c49d94e435739a6fd26dc986"Paul Duffin
This reverts commit fa15287abbfcd141938d562b79377063c75e4b23. The following commit will fix the problem that caused this to be reverted. The fix will be done separately to this so that it is easier to push upstream at a later date. Bug: 30683723 Change-Id: Ieb0107b85f232d883efec9be2c61f413bf3687d7 Test: Run the dexmaker-tests as described in the Android.mk file
2016-08-05Fix DexMakerTest#testMonitorEnterMonitorExit testPaul Duffin
A simple typo meant that monitors were never exited. The code hasn't worked since it was added (in 2012) which indicates that either the tests haven't been run since then, or Android added new checks since they were last run. Either way a good reason for running them more regularly. Bug: 30683723 Change-Id: I4a53d2ec108ca08fec77728a51aa0fe19b12c8b8 Test: Run the dexmaker tests
2016-08-03Revert upstream change 924bb5b1c1718ac4c49d94e435739a6fd26dc986Paul Duffin
The reverted change broke some android tests because it did not traverse the interface inheritance hierarchy when searching for methods to proxy. That change was introduced during the upgrade to 1.3 and so while it is fixing a problem none of the Android code that uses this version of dexmaker was affected by it so it should be safe to remove. Will work on a proper fix and test for upstream after this has been reverted as this is blocking other teams at the moment. Bug: 30299479 Change-Id: Id4a7dacdf74ac2b08ca28a7677b71b191b0c36bd Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
2016-08-01Upgrade to v1.3Paul Duffin
Removed bug-10862083.patch as that patch is no longer needed. Bug: 30299479 Test: Build and run mockito based tests. Change-Id: Idb07bee4a85f04a2b0408a8a25b665706a656e57
2016-07-22Restructure files to match upstream structure for v1.3Paul Duffin
This is in preparation for upgrading to v1.3 as part of the work to upgrade mockito to 1.10.19. src/main -> dexmaker/src/main src/test -> dexmaker/src/test src/dx -> dx/src/main src/mockito -> mockito/src/main The README is moved to README.google to be consistent with other open source based projects in AOSP. Also updates the patch files and instructions on how to use them. Bug: 30299479 Test: Build and run some mockito based tests. Change-Id: I2d80acc1e117a26e55dc8c4522eb9bc79f3852cc