Skip to content

Commit

Permalink
Merge pull request #21108 from madurangasiriwardena/jacoco3
Browse files Browse the repository at this point in the history
Improvements to the jacoco report generation
  • Loading branch information
madurangasiriwardena committed Sep 17, 2024
2 parents 358cf42 + 7b8e3b8 commit 20050db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/fapi-oidc-conformance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,6 @@ jobs:
name: test-logs
path: ./*log.txt

- name: Archive Jacoco exec
uses: actions/upload-artifact@v4
if: always()
with:
name: jacoco-exec
path: ./jacoco.exec

- name: Build Jacoco Report Generator
run: |
cd ./product-is/modules/integration/tests-common/jacoco-report-generator
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/oidc-conformance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,6 @@ jobs:
name: test-logs
path: ./*log.txt

- name: Archive Jacoco exec
uses: actions/upload-artifact@v4
if: always()
with:
name: jacoco-exec
path: ./jacoco.exec

- name: Build Jacoco Report Generator
run: |
cd ./product-is/modules/integration/tests-common/jacoco-report-generator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public ReportGenerator(File executionDataFile, Set<File> classDirectories) {
}

/**
* Create the report.
* Create the report based on the jacoco.exec file.
*
* @throws IOException - Throws if report creation fails
*/
Expand Down Expand Up @@ -177,9 +177,13 @@ private IBundleCoverage analyzeStructure() throws IOException {
return coverageBuilder.getBundle(title);
}

/**
* Create a concrete report visitor based on some supplied configuration. In this case we use the defaults.
* @param bundleCoverage - Bundle coverage
* @throws IOException
*/
private void createReport(final IBundleCoverage bundleCoverage) throws IOException {

// Create a concrete report visitor based on some supplied configuration. In this case we use the defaults
try (FileOutputStream fos = new FileOutputStream(xmlReport)) {
final XMLFormatter xmlFormatter = new XMLFormatter();
final IReportVisitor visitor = xmlFormatter.createVisitor(fos);
Expand Down Expand Up @@ -207,7 +211,7 @@ private void createReport(final IBundleCoverage bundleCoverage) throws IOExcepti
* @return - Jar file extracted directory.
* @throws IOException - Throws if jar extraction fails
*/
private synchronized String extractJarFile(String jarFilePath, File tempDir) throws IOException {
private String extractJarFile(String jarFilePath, File tempDir) throws IOException {

if (!jarFilePath.endsWith(".war") && !jarFilePath.endsWith(".jar")) {
throw new IllegalArgumentException(String.format(INVALID_EXTENSION_ERROR, jarFilePath));
Expand Down

0 comments on commit 20050db

Please sign in to comment.