Skip to content
Snippets Groups Projects
Commit 22ea7d37 authored by René Schöne's avatar René Schöne
Browse files

fix jacoco again

parent a5dc9daa
No related branches found
No related tags found
1 merge request!9Resolve "Split tests into service-based and normal tests"
Pipeline #8808 passed
......@@ -14,7 +14,7 @@ variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
TEST_REPORTS: "eraser-base/build/reports/tests/"
TEST_LOG: "eraser-base/logs/eraser-test.log"
JACOCO_REPORT: "*/build/reports/jacoco/all-tests/jacocoTestReport.xml"
JACOCO_REPORT: "*/build/reports/jacoco/all-tests/jacoco*Report.xml"
# settings for influxdb
INFLUXDB_DB: "jastaddHistory"
INFLUXDB_USER: "root"
......
......@@ -28,7 +28,6 @@ task allTests(type: Test, dependsOn: testClasses) {
group = 'verification'
useJUnitPlatform {
includeTags 'mqtt | influx'
}
}
......
import glob
import os
import untangle
print('Current path: ' + os.path.abspath(os.curdir))
obj = untangle.parse('eraser-base/build/reports/jacoco/test/jacocoTestReport.xml')
print(f'Current path: {os.path.abspath(os.curdir)}')
missed, covered = 0, 0
for f in glob.iglob(os.getenv('JACOCO_REPORT')):
print(f'Checking {f}')
obj = untangle.parse(f)
instructions = [o for o in obj.report.counter if o['type'] == 'INSTRUCTION'][0]
missed, covered = int(instructions['missed']), int(instructions['covered'])
missed += int(instructions['missed'])
covered += int(instructions['covered'])
# print missed / (missed + covered)
print('Covered %.2f%% of instructions for all projects.' % (missed * 100.0 / (missed + covered)))
if missed == covered == 0:
covered = 1
print('Covered %.2f%% of instructions for all projects.' % (covered * 100.0 / (missed + covered)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment