summaryrefslogtreecommitdiff
path: root/java/jacoco.go
AgeCommit message (Collapse)Author
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