Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
No need to compute coverage for Java anymore.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 13 Jan 2023 10:21:04 +0000 (11:21 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 13 Jan 2023 10:23:53 +0000 (11:23 +0100)
[ci-skip]

sonar-project.properties
tools/jenkins/Coverage.sh
tools/jenkins/jacoco.xml [deleted file]
tools/tesh/tesh.py

index 41b560a..ce4b832 100644 (file)
@@ -187,11 +187,9 @@ sonar.python.version=3
 
 ### NOTE: the following properties are overridden by Jenkins configuration
 ###
-#sonar.java.binaries
 #sonar.cfamily.build-wrapper-output
 #sonar.cfamily.gcov.reportsPath
 #sonar.python.coverage.reportPaths
-#sonar.coverage.jacoco.xmlReportPaths
 #sonar.cfamily.threads
 #sonar.cfamily.cache.enabled
 #sonar.cfamily.cache.path
index 2eb97cc..e37a76d 100755 (executable)
@@ -55,7 +55,6 @@ NUMPROC="$(nproc)" || NUMPROC=1
 
 
 cd "$BUILDFOLDER"
-rm -rf jacoco_cov*
 rm -rf python_cov*
 rm -rf xml_coverage.xml
 
@@ -72,31 +71,14 @@ cmake -Denable_documentation=OFF \
 
 #build with sonarqube scanner wrapper
 /home/ci/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-outputs make -j$NUMPROC tests
-JACOCO_PATH="/usr/local/share/jacoco"
-export JAVA_TOOL_OPTIONS="-javaagent:${JACOCO_PATH}/lib/jacocoagent.jar"
 
 export PYTHON_TOOL_OPTIONS="/usr/bin/python3-coverage run --parallel-mode --branch"
 
 ctest --no-compress-output -D ExperimentalTest -j$NUMPROC || true
 ctest -D ExperimentalCoverage || true
 
-unset JAVA_TOOL_OPTIONS
 if [ -f Testing/TAG ] ; then
 
-  files=$( find . -size +1c -name "jacoco.exec" )
-  i=0
-  for file in $files
-  do
-    sourcepath=$( dirname "$file" )
-    #convert jacoco reports in xml ones
-    ant -f "$WORKSPACE"/tools/jenkins/jacoco.xml -Dexamplesrcdir="$WORKSPACE" -Dbuilddir="$BUILDFOLDER"/"${sourcepath}" -Djarfile="$BUILDFOLDER"/simgrid.jar -Djacocodir=${JACOCO_PATH}/lib
-    #convert jacoco xml reports in cobertura xml reports
-    cover2cover.py "$BUILDFOLDER"/"${sourcepath}"/report.xml .. ../src/bindings/java src/bindings/java > "$BUILDFOLDER"/java_coverage_${i}.xml
-    #save jacoco xml report as sonar only allows it
-    mv "$BUILDFOLDER"/"${sourcepath}"/report.xml "$BUILDFOLDER"/jacoco_cov_${i}.xml
-    i=$((i + 1))
-  done
-
   #convert python coverage reports in xml ones
   cd "$BUILDFOLDER"
   find .. -size +1c -name ".coverage*" -exec mv {} . \;
diff --git a/tools/jenkins/jacoco.xml b/tools/jenkins/jacoco.xml
deleted file mode 100644 (file)
index dd4ac04..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<project name="Example" xmlns:jacoco="antlib:org.jacoco.ant">
-
-    <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
-        <classpath path="${jacocodir}/jacocoant.jar"/>
-    </taskdef>
-
-<jacoco:report>
-
-    <executiondata>
-        <file file="${builddir}/jacoco.exec"/>
-    </executiondata>
-
-    <structure name="Example Project">
-        <classfiles>
-            <fileset dir="${builddir}"/>
-            <fileset file="${jarfile}"/>
-        </classfiles>
-        <sourcefiles encoding="UTF-8">
-            <fileset dir="${examplesrcdir}"/>
-        </sourcefiles>
-    </structure>
-
-    <xml destfile="${builddir}/report.xml"/>
-
-</jacoco:report>
-
-</project>
index 69835fb..d57e557 100755 (executable)
@@ -554,8 +554,6 @@ def main():
             re.compile(r"profiling:"),
             re.compile(r"Unable to clean temporary file C:"),
             re.compile(r".*Configuration change: Set 'contexts/"),
-            re.compile(r"Picked up JAVA_TOOL_OPTIONS: "),
-            re.compile(r"Picked up _JAVA_OPTIONS: "),
             re.compile(r"==[0-9]+== ?WARNING: ASan doesn't fully support"),
             re.compile(r"==[0-9]+== ?WARNING: ASan is ignoring requested __asan_handle_no_return: stack "),
             re.compile(r"False positive error reports may follow"),