11 for d in "$WORKSPACE/build"
15 rm -rf "$d" || die "Could not remote $d"
20 ### Check the node installation
22 for pkg in xsltproc gcovr ant cover2cover.py
26 echo "$pkg is installed. Good."
28 die "please install $pkg before proceeding"
32 ### Cleanup previous runs
34 ! [ -z "$WORKSPACE" ] || die "No WORKSPACE"
35 [ -d "$WORKSPACE" ] || die "WORKSPACE ($WORKSPACE) does not exist"
39 for d in "$WORKSPACE/build"
41 mkdir "$d" || die "Could not create $d"
44 NUMPROC="$(nproc)" || NUMPROC=1
49 ctest -D ExperimentalStart || true
51 cmake -Denable_documentation=OFF -Denable_lua=ON -Denable_java=ON \
52 -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON \
53 -Denable_jedule=ON -Denable_mallocators=ON \
54 -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_model-checking=ON \
55 -Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_smpi_ISP_testsuite=ON -Denable_coverage=ON $WORKSPACE
58 JACOCO_PATH="/usr/local/share/jacoco"
59 export JAVA_TOOL_OPTIONS="-javaagent:${JACOCO_PATH}/lib/jacocoagent.jar"
61 ctest -D ExperimentalTest -j$NUMPROC || true
62 ctest -D ExperimentalCoverage || true
64 unset JAVA_TOOL_OPTIONS
66 if [ -f Testing/TAG ] ; then
67 for example in app/bittorrent app/centralizedmutex app/masterworker app/pingpong app/tokenring async/yield async/waitall async/dsend cloud/migration cloud/masterworker dht/chord dht/kademlia energy/consumption energy/pstate energy/vm io/file io/storage process/kill process/migration process/startkilltime process/suspend task/priority trace/pingpong
69 #convert jacoco reports in xml ones
70 ant -f $WORKSPACE/tools/jenkins/jacoco.xml -Dsrcdir=$WORKSPACE/examples/java/${example} -Dbuilddir=$WORKSPACE/build/examples/java/${example} -Djacocodir=${JACOCO_PATH}/lib
71 #convert jacoco xml reports in cobertura xml reports
72 cover2cover.py $WORKSPACE/build/examples/java/${example}/report.xml $WORKSPACE/examples/java/ > $WORKSPACE/java_coverage_${i}.xml
75 #convert all gcov reports to xml cobertura reports
76 gcovr -r .. --xml-pretty -e teshsuite.* -u -o $WORKSPACE/xml_coverage.xml
77 xsltproc $WORKSPACE/tools/jenkins/ctest2junit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > CTestResults_memcheck.xml
78 mv CTestResults_memcheck.xml $WORKSPACE