forked from NMSU-SDev/Programs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
170 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<!-- Sample Ant build file for running IglooScore under JaCoCo --> | ||
<!-- Jonathan Cook, 17 Sep 2015 --> | ||
<project name="iglooscore" default="jacocoreport" xmlns:jacoco="antlib:org.jacoco.ant"> | ||
|
||
<!-- property to allow ant to find jacoco: CHANGE THE PATH to point to yours --> | ||
<property name="jacocodir" location="/home/jcook/tools/jacoco/lib"/> | ||
|
||
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml"> | ||
<classpath path="${jacocodir}/jacocoant.jar"/> | ||
</taskdef> | ||
|
||
<!-- standard compile task, but turn debugging on for source viewing --> | ||
<target name="compile" description="compile the source"> | ||
<javac srcdir="." includeantruntime="false" debug="true"/> | ||
</target> | ||
|
||
<!-- tests if new jacoco run is needed by checking if the jacoco.exec file is | ||
newer than the class files or this build file --> | ||
<target name="checkRun"> | ||
<uptodate property="run.notneeded" targetfile="jacoco.exec"> | ||
<srcfiles dir="." includes="*.class build.xml" /> | ||
</uptodate> | ||
</target> | ||
|
||
<!-- run program under jacoco: this example has two runs, you'll need to perhaps | ||
modify them, and then add more; this only runs if needed --> | ||
<target name="jacocorun" depends="compile,checkRun" unless="run.notneeded"> | ||
<delete> | ||
<!-- must delete coverage data file to start afresh (otherwise coverage accumulates) --> | ||
<fileset dir="." includes="jacoco.exec"/> | ||
</delete> | ||
<echo message="TEST IglooScore1: 8 9 6"/> | ||
<java classname="IglooScore1" fork="true"> | ||
<arg value="8"/><arg value="9"/><arg value="6"/> | ||
<jvmarg line="-javaagent:${jacocodir}/jacocoagent.jar"/> | ||
</java> | ||
<echo message="TEST IglooScore2: 8 9 6"/> | ||
<java classname="IglooScore2" fork="true"> | ||
<arg value="8"/><arg value="9"/><arg value="6"/> | ||
<jvmarg line="-javaagent:${jacocodir}/jacocoagent.jar"/> | ||
</java> | ||
</target> | ||
|
||
<!-- tests if new jacoco report needs generated by checking if top report file | ||
(index.html) is newer than the run data file (jacoco.exec) --> | ||
<target name="checkReport"> | ||
<uptodate property="report.notneeded" targetfile="report/index.html" srcfile="jacoco.exec" /> | ||
</target> | ||
|
||
<!-- generate a new jacoco report from a new data file; only runs if needed --> | ||
<target name="jacocoreport" depends="jacocorun,checkReport" unless="report.notneeded"> | ||
<jacoco:report> | ||
<executiondata> | ||
<file file="jacoco.exec"/> | ||
</executiondata> | ||
<structure name="iglooscore"> | ||
<classfiles> | ||
<fileset dir="."/> | ||
</classfiles> | ||
<sourcefiles encoding="UTF-8"> | ||
<fileset dir="."/> | ||
</sourcefiles> | ||
</structure> | ||
<html destdir="report"/> | ||
</jacoco:report> | ||
</target> | ||
|
||
<!-- clean up by removing all generated files; do "ant clean" to start afresh --> | ||
<target name="clean"> | ||
<delete> | ||
<fileset dir="." includes="*.class jacoco.exec"/> | ||
</delete> | ||
<delete dir="report" /> | ||
</target> | ||
|
||
</project> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package edu.nmsu.cs.helloworld; | ||
|
||
public class helloworld { | ||
|
||
public static void main(String[] args) { | ||
System.out.println("Hello World!"); | ||
} | ||
|
||
} |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<!-- Sample Ant build file for running IglooScore under JaCoCo --> | ||
<!-- Jonathan Cook, 17 Sep 2015 --> | ||
<project name="iglooscore" default="jacocoreport" xmlns:jacoco="antlib:org.jacoco.ant"> | ||
|
||
<!-- property to allow ant to find jacoco: CHANGE THE PATH to point to yours --> | ||
<property name="jacocodir" location="/home/jcook/tools/jacoco/lib"/> | ||
|
||
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml"> | ||
<classpath path="${jacocodir}/jacocoant.jar"/> | ||
</taskdef> | ||
|
||
<!-- standard compile task, but turn debugging on for source viewing --> | ||
<target name="compile" description="compile the source"> | ||
<javac srcdir="." includeantruntime="false" debug="true"/> | ||
</target> | ||
|
||
<!-- tests if new jacoco run is needed by checking if the jacoco.exec file is | ||
newer than the class files or this build file --> | ||
<target name="checkRun"> | ||
<uptodate property="run.notneeded" targetfile="jacoco.exec"> | ||
<srcfiles dir="." includes="*.class build.xml" /> | ||
</uptodate> | ||
</target> | ||
|
||
<!-- run program under jacoco: this example has two runs, you'll need to perhaps | ||
modify them, and then add more; this only runs if needed --> | ||
<target name="jacocorun" depends="compile,checkRun" unless="run.notneeded"> | ||
<delete> | ||
<!-- must delete coverage data file to start afresh (otherwise coverage accumulates) --> | ||
<fileset dir="." includes="jacoco.exec"/> | ||
</delete> | ||
<echo message="TEST IglooScore1: 8 9 6"/> | ||
<java classname="IglooScore1" fork="true"> | ||
<arg value="8"/><arg value="9"/><arg value="6"/> | ||
<jvmarg line="-javaagent:${jacocodir}/jacocoagent.jar"/> | ||
</java> | ||
<echo message="TEST IglooScore2: 8 9 6"/> | ||
<java classname="IglooScore2" fork="true"> | ||
<arg value="8"/><arg value="9"/><arg value="6"/> | ||
<jvmarg line="-javaagent:${jacocodir}/jacocoagent.jar"/> | ||
</java> | ||
</target> | ||
|
||
<!-- tests if new jacoco report needs generated by checking if top report file | ||
(index.html) is newer than the run data file (jacoco.exec) --> | ||
<target name="checkReport"> | ||
<uptodate property="report.notneeded" targetfile="report/index.html" srcfile="jacoco.exec" /> | ||
</target> | ||
|
||
<!-- generate a new jacoco report from a new data file; only runs if needed --> | ||
<target name="jacocoreport" depends="jacocorun,checkReport" unless="report.notneeded"> | ||
<jacoco:report> | ||
<executiondata> | ||
<file file="jacoco.exec"/> | ||
</executiondata> | ||
<structure name="iglooscore"> | ||
<classfiles> | ||
<fileset dir="."/> | ||
</classfiles> | ||
<sourcefiles encoding="UTF-8"> | ||
<fileset dir="."/> | ||
</sourcefiles> | ||
</structure> | ||
<html destdir="report"/> | ||
</jacoco:report> | ||
</target> | ||
|
||
<!-- clean up by removing all generated files; do "ant clean" to start afresh --> | ||
<target name="clean"> | ||
<delete> | ||
<fileset dir="." includes="*.class jacoco.exec"/> | ||
</delete> | ||
<delete dir="report" /> | ||
</target> | ||
|
||
</project> | ||
|