Skip to content

Commit

Permalink
Add existing file
Browse files Browse the repository at this point in the history
  • Loading branch information
rhollomon committed Jan 26, 2023
1 parent 52bf7c7 commit 8222b9d
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 0 deletions.
77 changes: 77 additions & 0 deletions Circles/build.xml
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>

1 change: 1 addition & 0 deletions HelloWorld/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
9 changes: 9 additions & 0 deletions HelloWorld/src/edu/nmsu/cs/helloworld/helloworld.java
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 added Questions/p1Questions.txt
Empty file.
Empty file added Questions/p2Questions.txt
Empty file.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# User ID
rhollomon

# Programs
Base code for program assignments in Software Development (C S 371).

Expand All @@ -9,3 +12,6 @@ This assignment relies on the Coverage programs.

## Program 4
This assignment relies on the Circles programs.

## Lab 1
This assignment relies on the HelloWorld program.
77 changes: 77 additions & 0 deletions SimpleWebServer/build.xml
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>

0 comments on commit 8222b9d

Please sign in to comment.