summaryrefslogtreecommitdiff
path: root/java/jacoco.go
AgeCommit message (Collapse)Author
2024-05-02Reapply "Make the enabled property configurable" Cole Faust
Previously, I had changed some loadhook-appended property structs to use selects instead of the "target" property struct. This seems to not be exactly equivalent because "target" properties are merged with the regular properties later, at the time the arch mutator runs. With this reapplication, leave those target property structs alone to avoid breakages, but I'll have to look into what the issue is with them later. This reverts commit ed5276f0827915166e89b72bf26f7e65f68d2dd5. Ignore-AOSP-First: This cl needs to be in a topic with internal-only projects, will cherrypick to aosp after. Bug: 323382414 Test: m nothing --no-skip-soong-tests Change-Id: If355d24506e3f117d27b21442a6c02bca3402dc7
2024-05-01Revert "Make the enabled property configurable" Priyanka Advani
Revert submission 27162921-configurable_enabled_property Reason for revert: Droid-monitor created revert due to Build breakage in b/338253720. Will be verifying through ABTD before submission. Reverted changes: /q/submissionid:27162921-configurable_enabled_property Change-Id: I2d144f9d297373a13a1190b173d10c966181ad84
2024-04-30Make the enabled property configurable Cole Faust
This allows using select statements with it. Ignore-AOSP-First: This needs to be in a topic with changes in interal-only repositories, I'll cherrypick to aosp after. Bug: 323382414 Test: m nothing --no-skip-soong-tests Change-Id: I6f3efaaa3d82505e38a91ee4ba0e18e404360191
2023-11-01Use merge_zips instead of ziptime for resetting timestamps in jacoco outputs Colin Cross
ziptime doesn't support ZIP64 so it is limited to 65535 entries in a zip file. Use the newly added support in merge_zips to reset the timestamp instead. Bug: 308765940 Test: builds Change-Id: I7bc4d8d4943e7417af1783a63ac5b5904d2aa751
2022-09-09add jacocoagent by default to Java modules Sam Delmerico
On coverage builds, R8 will fail to properly optimize and fail the build if ignore_warnings: false, because jacoco injects dependencies on jacocoagent classes, but the jacocoagent library is not part of the classpath libraries passed in to R8 in its arguments. Instead we can add jacocoagent as a libs dependency for these modules so that it will get pulled into the r8 flags. Bug: 243903417 Test: m Change-Id: Icc24cc260b896fc800125a0318308d823ccf7a83
2021-06-30Added quotes to protect wildcard Maxim Pleshivenkov
When generating zip archive with zip2zip wildcard mask is specified. Bash attempts to resolve wildcard **/*.class. If android build top directory containts subfolder(s) with .class, bash wildcard resolution succeeds. Bash passes list of files to zip2zip instead of actual wildcard. Created archive doesn't contain required files. Adding quotes to wildcard to prvent that. Bug: NA Test: manual - build with coverage enabled Change-Id: Iebdaa32693fe820f0f79588d61cb89660ea2b611
2020-06-25Use a default exclude filter for JaCoCo in Soong. Chris Gross
Instrumented builds should exclude certain classes from instrumenation by default. (e.g. JaCoCo itself) Leverage the existing DefaultJacocoExclusionFilter to do this. Note: Two different default filters exist now (one for Make and one for Soong), as they have different wildcard rules. Test: EMMA_INSTRUMENT=true EMMA_INSTRUMENT_STATIC=true m -j32 TeleService and inspected the resulting temporary jar that was instrumented to confirm that anything from org/jacoco was excluded. Bug: 159748844 Change-Id: I5466b0a03957edfbe53971d5d1a7729fdb8337db
2019-06-11Tune JVM, print full diagnostics on crash. Sasha Smundak
JVM occasionally (0.5% time) crashes on entering a method with SIGSEGV. It might be due to excessive load on the host machine. Reduce the number of the compiler threads to 6, and do not start all the GC threads immediately. If JVM crashes, copy full diagnostics to stderr. Bug: 132766811 Test: treehugger Change-Id: Ib7bfd568f6d32456bf623cbb615ffc990c326a34
2019-06-05Revert "Revert "Revert "Print full diagnostics file when Java process ↵ Jimmy Chen
crashes.""" This reverts commit b4be09285522c0b55d9d7a2a64984d31cde57720. Reason for revert: break build Change-Id: I11fc5eb5f635a5d99eba962f5817851629e50ab2
2019-06-03Revert "Revert "Print full diagnostics file when Java process crashes."" Alexander Smundak
This reverts commit d71dc6b5e0b01e4835a033bb51c278a10b0c1481. Reason for revert: ag/974065 fixes the problem that caused the revert Change-Id: I3ba9eecdab34602aaf19fa518520ac932c9b97af
2019-05-31Revert "Print full diagnostics file when Java process crashes." Alexander Smundak
This reverts commit 9d6df2246c076142428b10c08f614b6ea615b095. Reason for revert: This change set the value of JAVA make variable to a string containing "foo bar". When soong_ui is asked to evaluate such string, it drops the quotes, causing bash to treat 'foo' and 'bar' as separate command line arguments. Change-Id: If4e3c4c950c305bb67a572de3d86119c2da81dc1
2019-05-29Print full diagnostics file when Java process crashes. Sasha Smundak
Bug: 132766811 Test: treehugger Change-Id: I8cca2486f2194a8643007a53e4a695d2a18abbf8
2019-03-04Replace *Escape with *EscapeList Colin Cross
Follow the change to blueprint to make *Escape take and return a string and add *EscapeList that take and return slices of strings. Fix up a few places that were unnecessarily converting a string to a slice and back to a string. Test: m nothing Change-Id: I3fa87de175522205f36544ef76aa2f04aef1b936
2018-01-29Change syntax for jacoco filter wildcard params. Nan Zhang
originally: .* -> /**/*.class now: .* -> /*.class .** -> /**/*.class Also add NinjaAndShellEscape to allow filtering inner classes with $ in the name. Test: unittests. Bug: b/71889972 Merged-In: Ifb8d7daa22bee02346885171edb15180af18f0de Change-Id: Ifb8d7daa22bee02346885171edb15180af18f0de (cherry picked from commit c61066684d5c8ddf600af602852c32fce6e6c6f4)
2018-01-03Fix jacoco_cli invocation Colin Cross
jacoco_cli --dest takes a directory, not a jar name, and assumes an output file with the same name as the input jar in that directory. Rename jacoco-report-classes.jar to jacoco-report-classes/modulename.jar, and generate to jacoco/tmp/modulename.jar before combining to the final output file at jacoco/modulename.jar. Bug: 69669951 Test: m EMMA_INSTRUMENT=true Change-Id: Ia7dd881d2819ae09dfb60a00b4c1b8396629cd9a
2017-12-21Update jacoco command line flags for latest version Colin Cross
jacoco_cli wants --quiet and --dest instead of -quiet and -dest. Bug: 69669951 Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false tests Change-Id: I72b3d0a21c5fa02a58914953d3d794065f59bd18
2017-12-21Fix jacoco filters Colin Cross
Add space after -x argument for jacoco excludes. Add .class to end of file name for jacoco includes. Bug: 64836607 Test: jacoco_test.go Change-Id: I4c1024755882c976f7326f7382c4f2e99a20233d
2017-12-21Add jacoco filter tests Colin Cross
Add tests for converting jacoco filters to command line arguments to soong_zip. Bug: 64836607 Test: jacoco_test.go Change-Id: I969fa877e4be19bb92dcab5a796a4e4ec3fc166a
2017-11-22Add Jacoco support Colin Cross
Add support for instrumenting jars with jacoco. Unlike in Make, Jacoco in Soong is done entirely using jars. Instrumentation is enabled by EMMA_INSTRUMENT=true, and affects all apps. If EMMA_INSTRUMENT_FRAMEWORK=true then it also affects any java libraries listed in InstrumentFrameworkModules. Bug: 69629238 Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false Change-Id: If699715b277529cd7322ffca67c23b0746e1cccd