Skip to content

Commit

Permalink
feat(sonar): add exec ref test
Browse files Browse the repository at this point in the history
  • Loading branch information
amkCha committed Jan 30, 2025
1 parent 2b63345 commit 8ec0156
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/reference-blockchain-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ jobs:
name: jacoco-reference-tests-coverage-report
path: reference-tests/build/reports/jacoco/jacocoReferenceBlockchainTestsReport/**/*

- name: Upload jacoco exec test
if: always()
uses: actions/upload-artifact@v4
with:
name: jacoco-reference-tests-exec
path: reference-tests/build/jacoco/referenceBlockchainTests.exec

- name: Extract Metrics
if: ${{ failure() || cancelled() }}
run: |
Expand Down
14 changes: 10 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@ buildscript {
plugins {
id 'java-library'
id "org.sonarqube" version "4.3.1.3277"
// id 'jacoco-report-aggregation'
}

/*dependencies {
implementation project(":arithmetization")
implementation project(":reference-tests")
}*/

sonar {
properties {
property "sonar.projectKey", "linea-tracer"
//property "sonar.organization", "myOrganization"
property "sonar.organization", "myOrganization"
property "sonar.host.url", "localhost:80"
//property "sonar.sources", "src/main/java"
property "sonar.login", "admin"
property "sonar.password", "Adminadmin123*"
property "sonar.coverage.exclusions", "reference-tests/**/*, testing/**/*, **/*/Trace.java"
//property "sonar.coverage.jacoco.xmlReportPaths", "${buildDir}/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml"
// property "sonar.coverage.jacoco.xmlReportPaths", "${buildDir}/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml"
property "sonar.coverage.jacoco.xmlReportPaths",
// "${project.projectDir}/reference-tests/build/reports/jacoco/jacocoReferenceBlockchainTestsReport/jacocoReferenceBlockchainTestsReport.xml"
"${project.projectDir}/arithmetization/build/reports/jacoco/test/jacocoTestReport.xml"
//"${project.projectDir}/reference-tests/build/reports/jacoco/jacocoReferenceBlockchainTestsReport/jacocoReferenceBlockchainTestsReport.xml"
"${project.projectDir}/arithmetization/build/reports/jacoco/test/jacocoTestReport.xml"
// property "sonar.exclusions", "src/main/java/com/foo/Foo.java"
}
}
Expand Down
4 changes: 3 additions & 1 deletion gradle/tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ tasks.withType(Test).configureEach {
jacocoTestReport {
reports {
xml.required = true
html.required = true
}

// executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")

}

tasks.test.configure {
Expand Down
3 changes: 2 additions & 1 deletion reference-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ tasks.register("jacocoReferenceBlockchainTestsReport", JacocoReport) {
}

sourceSets project(":arithmetization").sourceSets.main
// executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
// additionalSourceDirs = files(sourceSets.main.allSource.srcDirs)
// classDirectories = files(sourceSets.main.output)
// sourceDirectories = files(sourceSets.main.allSource.srcDirs)
Expand All @@ -91,7 +92,7 @@ tasks.register("jacocoReferenceBlockchainTestsReport", JacocoReport) {
})
*/

executionData(referenceBlockchainTests)
// (referenceBlockchainTests)
}

tasks.register('referenceGeneralStateTests', Test) {
Expand Down

0 comments on commit 8ec0156

Please sign in to comment.